]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nfs: fix broken handling of the softreval mount option
authorDan Aloni <dan.aloni@vastdata.com>
Sun, 8 May 2022 12:54:50 +0000 (15:54 +0300)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 9 May 2022 17:02:54 +0000 (13:02 -0400)
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: b7d3e29ef647 ("NFS: Add mount option 'softreval'")
Signed-off-by: Dan Aloni <dan.aloni@vastdata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/fs_context.c

index e2d59bb5e6bbe788953443e6fa54b6ead01c7d7d..9a16897e8dc6b2036c30148f8793604e046097ec 100644 (file)
@@ -517,7 +517,7 @@ static int nfs_fs_context_parse_param(struct fs_context *fc,
                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)