summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2020-12-14 16:40:23 +1000
committerSteve French <stfrench@microsoft.com>2020-12-14 09:26:30 -0600
commit531f03bc6d0509f2e7a5852e3f1819166e0f364c (patch)
tree22890e2c2aeb124e66997997bbe9d313ad9beb1e /fs/cifs
parent7c7ee628f8e94720727709424b3afdae7e73d028 (diff)
downloadlinux-531f03bc6d0509f2e7a5852e3f1819166e0f364c.tar.bz2
cifs: do not allow changing posix_paths during remount
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/fs_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index c3c6d0cd291b..58da674c0365 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -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;