]> Gentwo Git Trees - linux/.git/commit
libceph: add empty check to ceph_con_get_out_msg()
authorMax Kellermann <max.kellermann@ionos.com>
Wed, 6 Aug 2025 09:48:55 +0000 (11:48 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 8 Oct 2025 21:30:47 +0000 (23:30 +0200)
commit6140f1d43ba9425dc55b12bdfd8877b0c5118d9a
treeb5497493ffb75fe6e6c1c58dda83cb9ae2bbf202
parent7399212dcf64d90a6ab239bdd98bd325d922fc7e
libceph: add empty check to ceph_con_get_out_msg()

This moves the list_empty() checks from the two callers (v1 and v2)
into the base messenger.c library.  Now the v1/v2 specializations do
not need to know about con->out_queue; that implementation detail is
now hidden behind the ceph_con_get_out_msg() function.

[ idryomov: instead of changing prepare_write_message() to return
  a bool, move ceph_con_get_out_msg() call out to arrive to the same
  pattern as in messenger_v2.c ]

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>
net/ceph/messenger.c
net/ceph/messenger_v1.c
net/ceph/messenger_v2.c