pNFS: Fix missing layoutreturn calls
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 27 Jan 2016 04:12:11 +0000 (23:12 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 27 Jan 2016 04:12:11 +0000 (23:12 -0500)
commit13c13a6ad71f98c3b6189dfc89a9a743ab02a39a
tree8ad5d6ec00251a0e8219da0e3735d82b57736154
parent92e963f50fc74041b5e9e744c330dca48e04f08d
pNFS: Fix missing layoutreturn calls

The layoutreturn code currently relies on pnfs_put_lseg() to initiate the
RPC call when conditions are right. A problem arises when we want to
free the layout segment from inside an inode->i_lock section (e.g. in
pnfs_clear_request_commit()), since we cannot sleep.

The workaround is to move the actual call to pnfs_send_layoutreturn()
to pnfs_put_layout_hdr(), which doesn't have this restriction.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/pnfs.c