OSDN Git Service

NFSv4: Fix races between open and delegreturn
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 21 Oct 2019 17:56:59 +0000 (13:56 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Nov 2019 02:28:46 +0000 (21:28 -0500)
commitee05f456772d4e3a04b539187473f50c394da5fa
tree28542a5f414085abaf9a6dc9560e586d1a71b9ad
parent42c304c34e2d2c73d301b222418ac019918a1c59
NFSv4: Fix races between open and delegreturn

If the server returns the same delegation in an open that we just used
in a delegreturn, we need to ensure we don't apply that stateid if
the delegreturn has freed it on the server.
To do so, we ensure that we do not free the storage for the delegation
until either it is replaced by a new one, or we throw the inode out of
cache.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/delegation.c