Commit a902274
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 <[email protected]>
Cc: Steve French <[email protected]>
Cc: Tom Talpey <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Stefan Metzmacher <[email protected]>
Acked-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>1 parent 8059c64 commit a902274
1 file changed
+38
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
526 | 532 | | |
527 | 533 | | |
528 | 534 | | |
| |||
908 | 914 | | |
909 | 915 | | |
910 | 916 | | |
911 | | - | |
| 917 | + | |
912 | 918 | | |
913 | | - | |
914 | 919 | | |
915 | 920 | | |
916 | 921 | | |
| |||
919 | 924 | | |
920 | 925 | | |
921 | 926 | | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
922 | 937 | | |
923 | 938 | | |
924 | 939 | | |
925 | 940 | | |
926 | 941 | | |
| 942 | + | |
927 | 943 | | |
928 | 944 | | |
929 | 945 | | |
930 | 946 | | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | 947 | | |
944 | 948 | | |
945 | 949 | | |
| |||
1029 | 1033 | | |
1030 | 1034 | | |
1031 | 1035 | | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1032 | 1048 | | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1041 | 1055 | | |
| 1056 | + | |
1042 | 1057 | | |
| 1058 | + | |
1043 | 1059 | | |
1044 | 1060 | | |
1045 | 1061 | | |
| |||
0 commit comments