]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: client: pass struct smbdirect_socket to smbd_post_send_iter()
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Aug 2025 08:27:01 +0000 (10:27 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:50 +0000 (18:29 -0500)
This will make it easier to move function to the common code
in future.

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

index 7990c0409193c99c0479aca9d5266817113ea3c3..211cf391edb5ab7f0cea5f6771bbe7358b96ac38 100644 (file)
@@ -1038,11 +1038,10 @@ static int smbd_post_send(struct smbdirect_socket *sc,
        return rc;
 }
 
-static int smbd_post_send_iter(struct smbd_connection *info,
+static int smbd_post_send_iter(struct smbdirect_socket *sc,
                               struct iov_iter *iter,
                               int *_remaining_data_length)
 {
-       struct smbdirect_socket *sc = &info->socket;
        struct smbdirect_socket_parameters *sp = &sc->parameters;
        int i, rc;
        int header_length;
@@ -1206,13 +1205,14 @@ static int smbd_post_send_empty(struct smbd_connection *info)
        int remaining_data_length = 0;
 
        sc->statistics.send_empty++;
-       return smbd_post_send_iter(info, NULL, &remaining_data_length);
+       return smbd_post_send_iter(sc, NULL, &remaining_data_length);
 }
 
 static int smbd_post_send_full_iter(struct smbd_connection *info,
                                    struct iov_iter *iter,
                                    int *_remaining_data_length)
 {
+       struct smbdirect_socket *sc = &info->socket;
        int rc = 0;
 
        /*
@@ -1222,7 +1222,7 @@ static int smbd_post_send_full_iter(struct smbd_connection *info,
         */
 
        while (iov_iter_count(iter) > 0) {
-               rc = smbd_post_send_iter(info, iter, _remaining_data_length);
+               rc = smbd_post_send_iter(sc, iter, _remaining_data_length);
                if (rc < 0)
                        break;
        }