]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit888aa4fa96d81fc6b6df547c865bf6ee343fdf7a
tree8ad5d6ec00251a0e8219da0e3735d82b57736154
parentd7e15052ecc9ac4f938d1d7432c1d120a2711a7e
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