]> Gentwo Git Trees - linux/.git/commit
smb: server: simplify sibling_list handling in smb_direct_flush_send_list/send_done
authorStefan Metzmacher <metze@samba.org>
Mon, 20 Oct 2025 18:36:00 +0000 (20:36 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Oct 2025 01:10:53 +0000 (20:10 -0500)
commita90227462a14f5bdf7dfd4b73c2b75c54834efce
tree49ea86e9e5cf46562dd3cb75babd745a7f72b2b9
parent8059c64049587dac8af37ad82e2034b64c2d9fee
smb: server: simplify sibling_list handling in smb_direct_flush_send_list/send_done

We have a list handling that is much easier to understand:

1. Before smb_direct_flush_send_list() is called all
   struct smbdirect_send_io messages are part of
   send_ctx->msg_list

2. Before smb_direct_flush_send_list() calls
   smb_direct_post_send() we remove the last
   element in send_ctx->msg_list and move all
   others into last->sibling_list. As only
   last has IB_SEND_SIGNALED and gets a completion
   vis send_done().

3. send_done() has an easy way to free all others
   in sendmsg->sibling_list (if there are any).
   And use list_for_each_entry_safe() instead of
   a complex custom logic.

This will help us to share send_done() in common
code soon, as it will work fine for the client too,
where last->sibling_list is currently always an empty list.

Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/transport_rdma.c