summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2020-12-16 18:04:27 -0600
committerSteve French <stfrench@microsoft.com>2020-12-16 21:53:14 -0600
commit2d0604934f507b8b4799f3c1dff41cca3dd85239 (patch)
tree3de5ea8dc97a9edf6a99b846cae81018e4871bb8 /fs/cifs
parent31f6551ad75608d9c71fd4d3548c33f1abc52093 (diff)
downloadlinux-2d0604934f507b8b4799f3c1dff41cca3dd85239.tar.bz2
cifs: Fix support for remount when not changing rsize/wsize
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 <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/fs_context.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 734b30db580f..0afccbbed2e6 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -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);