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:40:31 +0000 (10:40 +0200)
commit1a3a24e3514b608077049a1f4c7abfb9c6569716
tree615f170bac37669d059b0108e90ab0a5ca422063
parent555a70f7fff03bd669123487905c47ae27dbdaac
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