diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2020-11-04 10:26:39 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-12-14 23:21:49 +0100 |
commit | 8ee8abf797bb3cb6007e30ac17a15f93277b0e91 (patch) | |
tree | c8f925d4b70afb4ba0f40344f11811fbb8c93806 /net/ceph | |
parent | 0247192809e391009fec1b191080db953997477c (diff) | |
download | linux-8ee8abf797bb3cb6007e30ac17a15f93277b0e91.tar.bz2 |
libceph: change ceph_msg_data_cursor_init() to take cursor
Make it possible to have local cursors and embed them outside struct
ceph_msg.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/messenger.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 922fa158ffb2..ca3f39b4f664 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -1170,10 +1170,9 @@ static void __ceph_msg_data_cursor_init(struct ceph_msg_data_cursor *cursor) cursor->need_crc = true; } -static void ceph_msg_data_cursor_init(struct ceph_msg *msg, size_t length) +static void ceph_msg_data_cursor_init(struct ceph_msg_data_cursor *cursor, + struct ceph_msg *msg, size_t length) { - struct ceph_msg_data_cursor *cursor = &msg->cursor; - BUG_ON(!length); BUG_ON(length > msg->data_length); BUG_ON(!msg->num_data_items); @@ -1278,7 +1277,7 @@ static void prepare_message_data(struct ceph_msg *msg, u32 data_len) { /* Initialize data cursor */ - ceph_msg_data_cursor_init(msg, (size_t)data_len); + ceph_msg_data_cursor_init(&msg->cursor, msg, data_len); } /* |