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>
This commit is contained in:
Max Kellermann
2025-08-06 11:48:53 +02:00
committed by Ilya Dryomov
parent fbeafe782b
commit 59699a5a71
3 changed files with 4 additions and 5 deletions

View File

@@ -2110,7 +2110,7 @@ int ceph_con_in_msg_alloc(struct ceph_connection *con,
return ret;
}
void ceph_con_get_out_msg(struct ceph_connection *con)
struct ceph_msg *ceph_con_get_out_msg(struct ceph_connection *con)
{
struct ceph_msg *msg;
@@ -2141,7 +2141,7 @@ void ceph_con_get_out_msg(struct ceph_connection *con)
* message or in case of a fault.
*/
WARN_ON(con->out_msg);
con->out_msg = ceph_msg_get(msg);
return con->out_msg = ceph_msg_get(msg);
}
/*

View File

@@ -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),