NFSv4.x: fix lock recovery during delegation recall
authorOlga Kornievskaia <kolga@netapp.com>
Thu, 4 Oct 2018 18:45:00 +0000 (14:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:20:24 +0000 (08:20 +0100)
commit90d73c1cadb8af69fb8805638c29a9af482b46a9
tree605d14f3bc0f4bae3d0a503fcbeb5288a5f975a7
parent799c98cba0713ddd91697a2a8fc1d551fb22101a
NFSv4.x: fix lock recovery during delegation recall

[ Upstream commit 44f411c353bf6d98d5a34f8f1b8605d43b2e50b8 ]

Running "./nfstest_delegation --runtest recall26" uncovers that
client doesn't recover the lock when we have an appending open,
where the initial open got a write delegation.

Instead of checking for the passed in open context against
the file lock's open context. Check that the state is the same.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/delegation.c