From: Henrique Carvalho Date: Mon, 19 Jan 2026 16:42:13 +0000 (-0300) Subject: smb: client: add multichannel async work for CONFIG_CIFS_DFS_UPCALL=n X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=518a5cb988a304a49f0d5c46460028787aefe50d;p=thirdparty%2Flinux.git smb: client: add multichannel async work for CONFIG_CIFS_DFS_UPCALL=n Multichannel support is independent of DFS configuration. Extend the async multichannel setup to non-DFS cifs.ko. Reviewed-by: Shyam Prasad N Signed-off-by: Henrique Carvalho Signed-off-by: Steve French --- diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index d5661e9382d31..67dd0e9b9b11a 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -4000,6 +4000,7 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) { int rc = 0; struct cifs_mount_ctx mnt_ctx = { .cifs_sb = cifs_sb, .fs_ctx = ctx, }; + struct mchan_mount *mchan_mount = NULL; rc = cifs_mount_get_session(&mnt_ctx); if (rc) @@ -4027,14 +4028,27 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) if (rc) goto error; + if (ctx->multichannel) { + mchan_mount = mchan_mount_alloc(mnt_ctx.ses); + if (IS_ERR(mchan_mount)) { + rc = PTR_ERR(mchan_mount); + goto error; + } + } + rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); if (rc) goto error; + if (ctx->multichannel) + queue_work(cifsiod_wq, &mchan_mount->work); + free_xid(mnt_ctx.xid); return rc; error: + if (ctx->multichannel && !IS_ERR_OR_NULL(mchan_mount)) + mchan_mount_free(mchan_mount); cifs_mount_put_conns(&mnt_ctx); return rc; }