]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: Set the stable writes flag when initialising the super block
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 12 Feb 2021 21:41:19 +0000 (16:41 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 16 Feb 2021 21:11:14 +0000 (16:11 -0500)
We need to wait for outstanding writes on the page to complete before we
can update it.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/fs_context.c

index b6be02aa79f0af329dfbdc1e7e263b7aabf2fa7e..971a9251c1d97c2c7bda911cead74d5a26654def 100644 (file)
@@ -1512,6 +1512,8 @@ static int nfs_init_fs_context(struct fs_context *fc)
                ctx->selected_flavor    = RPC_AUTH_MAXFLAVOR;
                ctx->minorversion       = 0;
                ctx->need_mount         = true;
+
+               fc->s_iflags            |= SB_I_STABLE_WRITES;
        }
        fc->fs_private = ctx;
        fc->ops = &nfs_fs_context_ops;