pNFS: Fix a deadlock between read resends and layoutreturn
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 27 Nov 2016 20:12:39 +0000 (15:12 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 1 Dec 2016 22:21:38 +0000 (17:21 -0500)
commit54e4a0dfa25d9365c4e80a639e80d9213eb6edbe
tree5d1004f5fc0f7e1529e323524eda755e69ec08bd
parent9a837856cf612d83e9ede7081972a2fa78de6921
pNFS: Fix a deadlock between read resends and layoutreturn

We must not call nfs_pageio_init_read() on a new nfs_pageio_descriptor
while holding a reference to a layout segment, as that can deadlock
pnfs_update_layout().

Fixes: d67ae825a59d6 ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: stable@vger.kernel.org # v4.0+
fs/nfs/flexfilelayout/flexfilelayout.c
fs/nfs/pnfs.c