]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
libceph: make ceph_con_revoke_message() a msg op
authorAlex Elder <elder@inktank.com>
Fri, 1 Jun 2012 19:56:43 +0000 (14:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 19:38:24 +0000 (11:38 -0800)
commitce4516fbb42d2ad5adba4699ebc1703d4e08e821
tree19b4f581d776e60440b57de8400a976c4facddd8
parentae048538ab62c31f67d42e00a3183b8870809a3c
libceph: make ceph_con_revoke_message() a msg op

(cherry picked from commit 8921d114f5574c6da2cdd00749d185633ecf88f3)

ceph_con_revoke_message() is passed both a message and a ceph
connection.  A ceph_msg allocated for incoming messages on a
connection always has a pointer to that connection, so there's no
need to provide the connection when revoking such a message.

Note that the existing logic does not preclude the message supplied
being a null/bogus message pointer.  The only user of this interface
is the OSD client, and the only value an osd client passes is a
request's r_reply field.  That is always non-null (except briefly in
an error path in ceph_osdc_alloc_request(), and that drops the
only reference so the request won't ever have a reply to revoke).
So we can safely assume the passed-in message is non-null, but add a
BUG_ON() to make it very obvious we are imposing this restriction.

Rename the function ceph_msg_revoke_incoming() to reflect that it is
really an operation on an incoming message.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/ceph/messenger.h
net/ceph/messenger.c
net/ceph/osd_client.c