NFSv4.x: fix lock recovery during delegation recall
commitd9871d9c527b690b5a78c8a76b3f4f94fa03980d
authorOlga Kornievskaia <kolga@netapp.com>
Thu, 4 Oct 2018 18:45:00 +0000 (4 14:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:23:12 +0000 (24 08:23 +0100)
treeba472d93bb2caa63d63a26d8193891ee1a1db19d
parentc371855df52b9601a8db8a69ba96abd185107301
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