]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix an ABBA spinlock issue in pnfs_update_layout()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 13 Apr 2020 19:55:21 +0000 (15:55 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 13 Apr 2020 19:55:21 +0000 (15:55 -0400)
commit4844677afca35f52aad53cd77c9fa811e22daff7
tree8ab1e8a6c18cc76d2e520dc6095cbead15847f81
parent0e6c92ce1d170795a396f8108369eb2c8412797f
NFS: Fix an ABBA spinlock issue in pnfs_update_layout()

We need to drop the inode spinlock while calling nfs4_select_rw_stateid(),
since nfs4_copy_delegation_stateid() could take the delegation lock.
Note that it is safe to do this, since all other calls to
pnfs_update_layout() for that inode will find themselves blocked by
the lock we hold on NFS_LAYOUT_FIRST_LAYOUTGET.

Fixes: 2327400ec2d7 ("NFS: Beware when dereferencing the delegation cred")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pnfs.c