From: Ronnie Sahlberg Date: Mon, 14 Dec 2020 06:40:23 +0000 (+1000) Subject: cifs: do not allow changing posix_paths during remount X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=531f03bc6d0509f2e7a5852e3f1819166e0f364c;p=linux.git cifs: do not allow changing posix_paths during remount Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French --- diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index c3c6d0cd291ba..58da674c03650 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;