NFSv4.2: Always flush out writes in nfs42_proc_fallocate()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 28 Mar 2021 22:17:14 +0000 (18:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:57:38 +0000 (10:57 +0200)
commit37db8508783d8b5f34b9037c0f30be781b4a86fd
tree842dc0fc1726c7bbc56ecbb6618cabce6ced5e0e
parent9d52e42ea6a41d9d3d0297f2d3823977cdd49f99
NFSv4.2: Always flush out writes in nfs42_proc_fallocate()

[ Upstream commit 99f23783224355e7022ceea9b8d9f62c0fd01bd8 ]

Whether we're allocating or delallocating space, we should flush out the
pending writes in order to avoid races with attribute updates.

Fixes: 1e564d3dbd68 ("NFSv4.2: Fix a race in nfs42_proc_deallocate()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs42proc.c