{
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)
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;
}