diff mbox series

[18/21] cifs: do not allow changing posix_paths during remount

Message ID 20201207233646.29823-18-lsahlber@redhat.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Ronnie Sahlberg Dec. 7, 2020, 11:36 p.m. UTC
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
---
 fs/cifs/fs_context.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 00bb11939837..ee9c1fb666c7 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -624,6 +624,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;