cifs: do not allow changing posix_paths during remount
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 14 Dec 2020 06:40:23 +0000 (16:40 +1000)
committerSteve French <stfrench@microsoft.com>
Mon, 14 Dec 2020 15:26:30 +0000 (09:26 -0600)
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/fs_context.c

index c3c6d0c..58da674 100644 (file)
@@ -627,6 +627,10 @@ static void smb3_fs_context_free(struct fs_context *fc)
 static int smb3_verify_reconfigure_ctx(struct smb3_fs_context *new_ctx,
                                       struct smb3_fs_context *old_ctx)
 {
+       if (new_ctx->posix_paths != old_ctx->posix_paths) {
+               cifs_dbg(VFS, "can not change posixpaths during remount\n");
+               return -EINVAL;
+       }
        if (new_ctx->sectype != old_ctx->sectype) {
                cifs_dbg(VFS, "can not change sec during remount\n");
                return -EINVAL;