Skip to content

Commit

Permalink
cifs: Fix support for remount when not changing rsize/wsize
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Steve French committed Dec 17, 2020
1 parent 31f6551 commit 2d06049
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/cifs/fs_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2d06049

Please sign in to comment.