aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger_v1.c
diff options
context:
space:
mode:
authorMax Kellermann <max.kellermann@ionos.com>2025-08-06 11:48:53 +0200
committerIlya Dryomov <idryomov@gmail.com>2025-10-08 23:30:46 +0200
commit59699a5a7114f09f890e86c09a6b32afb5eaa64c (patch)
tree87353dceda99ee62e577e58eb1cce24ecc9fc4dd /net/ceph/messenger_v1.c
parentceph: fix potential race condition on operations with CEPH_I_ODIRECT flag (diff)
downloadlinux-59699a5a7114f09f890e86c09a6b32afb5eaa64c.tar.gz
linux-59699a5a7114f09f890e86c09a6b32afb5eaa64c.zip
libceph: make ceph_con_get_out_msg() return the message pointer
The caller in messenger_v1.c loads it anyway, so let's keep the pointer in the register instead of reloading it from memory. This eliminates a tiny bit of unnecessary overhead. Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to '')
-rw-r--r--net/ceph/messenger_v1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ceph/messenger_v1.c b/net/ceph/messenger_v1.c
index 0cb61c76b9b8..eebe4e19d75a 100644
--- a/net/ceph/messenger_v1.c
+++ b/net/ceph/messenger_v1.c
@@ -210,8 +210,7 @@ static void prepare_write_message(struct ceph_connection *con)
&con->v1.out_temp_ack);
}
- ceph_con_get_out_msg(con);
- m = con->out_msg;
+ m = ceph_con_get_out_msg(con);
dout("prepare_write_message %p seq %lld type %d len %d+%d+%zd\n",
m, con->out_seq, le16_to_cpu(m->hdr.type),