Blob Blame History Raw
From: Dan Aloni <dan.aloni@vastdata.com>
Date: Sun, 8 May 2022 15:54:50 +0300
Subject: [PATCH] nfs: fix broken handling of the softreval mount option
Git-commit: 085d16d5f949b64713d5e960d6c9bbf51bc1d511
Patch-mainline: v5.18
References: git-fixes

Turns out that ever since this mount option was added, passing
`softreval` in NFS mount options cancelled all other flags while not
affecting the underlying flag `NFS_MOUNT_SOFTREVAL`.

Fixes: c74dfe97c104 ("NFS: Add mount option 'softreval'")
Signed-off-by: Dan Aloni <dan.aloni@vastdata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Acked-by: NeilBrown <neilb@suse.com>

---
 fs/nfs/fs_context.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -512,7 +512,7 @@ static int nfs_fs_context_parse_param(st
 		if (result.negated)
 			ctx->flags &= ~NFS_MOUNT_SOFTREVAL;
 		else
-			ctx->flags &= NFS_MOUNT_SOFTREVAL;
+			ctx->flags |= NFS_MOUNT_SOFTREVAL;
 		break;
 	case Opt_posix:
 		if (result.negated)