OSDN Git Service

NFSv4.1: Fix a potential layoutget/layoutrecall deadlock
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 12 Jul 2018 18:19:03 +0000 (14:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:41:37 +0000 (22:41 +0200)
commit137fee538bb0ba24ee867ebff9d4c974ac99e3b1
tree51d57b1c55d858a1c0d0b6e63988c43dfac08957
parent1256eeb12678b16c40a8cf0a16a5c2c1cedd0cfc
NFSv4.1: Fix a potential layoutget/layoutrecall deadlock

[ Upstream commit bd3d16a887b0c19a2a20d35ffed499e3a3637feb ]

If the client is sending a layoutget, but the server issues a callback
to recall what it thinks may be an outstanding layout, then we may find
an uninitialised layout attached to the inode due to the layoutget.
In that case, it is appropriate to return NFS4ERR_NOMATCHING_LAYOUT
rather than NFS4ERR_DELAY, as the latter can end up deadlocking.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/callback_proc.c