]> Git Repo - J-linux.git/commitdiff
cifs: Fix support for remount when not changing rsize/wsize
authorSteve French <[email protected]>
Thu, 17 Dec 2020 00:04:27 +0000 (18:04 -0600)
committerSteve French <[email protected]>
Thu, 17 Dec 2020 03:53:14 +0000 (21:53 -0600)
When remounting with the new mount API, we need to set
rsize and wsize to the previous values if they are not passed
in on the remount. Otherwise they get set to zero which breaks
xfstest 452 for example.

Signed-off-by: Steve French <[email protected]>
Reviewed-by: Ronnie Sahlberg <[email protected]>
Reviewed-by: Shyam Prasad N <[email protected]>
fs/cifs/fs_context.c

index 734b30db580fe8b66734fcfc11001625dce737b8..0afccbbed2e65363ef029eb6c5caf3af2cb77a70 100644 (file)
@@ -707,6 +707,13 @@ static int smb3_reconfigure(struct fs_context *fc)
        STEAL_STRING(cifs_sb, ctx, nodename);
        STEAL_STRING(cifs_sb, ctx, iocharset);
 
+       /* if rsize or wsize not passed in on remount, use previous values */
+       if (ctx->rsize == 0)
+               ctx->rsize = cifs_sb->ctx->rsize;
+       if (ctx->wsize == 0)
+               ctx->wsize = cifs_sb->ctx->wsize;
+
+
        smb3_cleanup_fs_context_contents(cifs_sb->ctx);
        rc = smb3_fs_context_dup(cifs_sb->ctx, ctx);
        smb3_update_mnt_flags(cifs_sb);
This page took 0.052799 seconds and 4 git commands to generate.