]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
smb: client: pass struct smbdirect_socket to get_mr()
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Aug 2025 23:14:38 +0000 (01:14 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:51 +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 2304a5c6f42684cb531b6470220a775f2c5143e4..e453b998a85952710e233b8e5c955acc8ac1dd71 100644 (file)
@@ -2345,9 +2345,8 @@ cleanup_entries:
  * issuing I/O trying to get MR at the same time, mr_list_lock is used to
  * protect this situation.
  */
-static struct smbdirect_mr_io *get_mr(struct smbd_connection *info)
+static struct smbdirect_mr_io *get_mr(struct smbdirect_socket *sc)
 {
-       struct smbdirect_socket *sc = &info->socket;
        struct smbdirect_mr_io *ret;
        int rc;
 again:
@@ -2428,7 +2427,7 @@ struct smbdirect_mr_io *smbd_register_mr(struct smbd_connection *info,
                return NULL;
        }
 
-       smbdirect_mr = get_mr(info);
+       smbdirect_mr = get_mr(sc);
        if (!smbdirect_mr) {
                log_rdma_mr(ERR, "get_mr returning NULL\n");
                return NULL;