summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2014-09-06 00:53:29 +0800
committerTom Haynes <loghyr@primarydata.com>2015-02-03 11:06:43 -0800
commitc220106fb45909719295474e2497ffe03e47dfb3 (patch)
tree5f4b0ba6cbe79da94576d47b74e9a73d1d552764 /fs/nfs
parente736a5b98c7aa98fe572990caf5fed9593c72a67 (diff)
downloadop-kernel-dev-c220106fb45909719295474e2497ffe03e47dfb3.zip
op-kernel-dev-c220106fb45909719295474e2497ffe03e47dfb3.tar.gz
nfs/filelayout: use pnfs_error_mark_layout_for_return
Instead of calling layoutreturn directly, call pnfs_error_mark_layout_for_return to mark layouts for return and let generic code return layout when layout segments are freed. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com> Conflicts: fs/nfs/filelayout/filelayout.c
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/filelayout/filelayout.c2
-rw-r--r--fs/nfs/pnfs_nfs.c10
2 files changed, 1 insertions, 11 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index bfa8547..5d2eadc 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -200,7 +200,7 @@ static int filelayout_async_handle_error(struct rpc_task *task,
dprintk("%s DS connection error %d\n", __func__,
task->tk_status);
nfs4_mark_deviceid_unavailable(devid);
- set_bit(NFS_LAYOUT_RETURN, &lo->plh_flags);
+ pnfs_error_mark_layout_for_return(inode, lseg);
rpc_wake_up(&tbl->slot_tbl_waitq);
/* fall through */
default:
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index c87f664..55bff41 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -18,20 +18,10 @@
#define NFSDBG_FACILITY NFSDBG_PNFS
-static void pnfs_generic_fenceme(struct inode *inode,
- struct pnfs_layout_hdr *lo)
-{
- if (!test_and_clear_bit(NFS_LAYOUT_RETURN, &lo->plh_flags))
- return;
- pnfs_return_layout(inode);
-}
-
void pnfs_generic_rw_release(void *data)
{
struct nfs_pgio_header *hdr = data;
- struct pnfs_layout_hdr *lo = hdr->lseg->pls_layout;
- pnfs_generic_fenceme(lo->plh_inode, lo);
nfs_put_client(hdr->ds_clp);
hdr->mds_ops->rpc_release(data);
}
OpenPOWER on IntegriCloud