]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: tweak ceph_alloc_msg()
authorAlex Elder <elder@inktank.com>
Mon, 4 Jun 2012 19:43:32 +0000 (14:43 -0500)
committerAlex Elder <elder@dreamhost.com>
Wed, 6 Jun 2012 14:23:54 +0000 (09:23 -0500)
commit8c1c4d4869e11647092a60d3b3255c8609d0371a
tree9939afc993d7ab8244518777b742f36dd3e038da
parent6493164c346230e5fa47d06ea8674f57e50aaa57
libceph: tweak ceph_alloc_msg()

The function ceph_alloc_msg() is only used to allocate a message
that will be assigned to a connection's in_msg pointer.  Rename the
function so this implied usage is more clear.

In addition, make that assignment inside the function (again, since
that's precisely what it's intended to be used for).  This allows us
to return what is now provided via the passed-in address of a "skip"
variable.  The return type is now Boolean to be explicit that there
are only two possible outcomes.

Make sure the result of an ->alloc_msg method call always sets the
value of *skip properly.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
net/ceph/messenger.c
net/ceph/mon_client.c
net/ceph/osd_client.c