aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs_nfs.c
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2014-09-05 12:53:29 -0400
committerTom Haynes <loghyr@primarydata.com>2015-02-03 14:06:43 -0500
commitc220106fb45909719295474e2497ffe03e47dfb3 (patch)
tree5f4b0ba6cbe79da94576d47b74e9a73d1d552764 /fs/nfs/pnfs_nfs.c
parente736a5b98c7aa98fe572990caf5fed9593c72a67 (diff)
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/pnfs_nfs.c')
-rw-r--r--fs/nfs/pnfs_nfs.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index c87f664587ee..55bff41180e8 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -18,20 +18,10 @@
18 18
19#define NFSDBG_FACILITY NFSDBG_PNFS 19#define NFSDBG_FACILITY NFSDBG_PNFS
20 20
21static void pnfs_generic_fenceme(struct inode *inode,
22 struct pnfs_layout_hdr *lo)
23{
24 if (!test_and_clear_bit(NFS_LAYOUT_RETURN, &lo->plh_flags))
25 return;
26 pnfs_return_layout(inode);
27}
28
29void pnfs_generic_rw_release(void *data) 21void pnfs_generic_rw_release(void *data)
30{ 22{
31 struct nfs_pgio_header *hdr = data; 23 struct nfs_pgio_header *hdr = data;
32 struct pnfs_layout_hdr *lo = hdr->lseg->pls_layout;
33 24
34 pnfs_generic_fenceme(lo->plh_inode, lo);
35 nfs_put_client(hdr->ds_clp); 25 nfs_put_client(hdr->ds_clp);
36 hdr->mds_ops->rpc_release(data); 26 hdr->mds_ops->rpc_release(data);
37} 27}