summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs_nfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2020-03-21 11:13:05 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2020-03-27 16:34:35 -0400
commit9c455a8c1e146dac3a6d1405fe6a7096177b9546 (patch)
tree4782333e8245a219abb3139814856c56195d1c6b /fs/nfs/pnfs_nfs.c
parent0aa647b7369dd29de0789c321111b2e4668c46b2 (diff)
downloadlinux-9c455a8c1e146dac3a6d1405fe6a7096177b9546.tar.bz2
NFS/pNFS: Clean up pNFS commit operations
Move the pNFS commit related operations into a separate structure that can be carried by the pnfs_ds_commit_info. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/pnfs_nfs.c')
-rw-r--r--fs/nfs/pnfs_nfs.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 20f12f3cbe38..06df2e6663dc 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -149,17 +149,6 @@ pnfs_add_commit_array(struct pnfs_ds_commit_info *fl_cinfo,
}
EXPORT_SYMBOL_GPL(pnfs_add_commit_array);
-static void
-pnfs_setup_ds_info(struct pnfs_ds_commit_info *fl_cinfo,
- struct pnfs_layout_segment *lseg)
-{
- struct inode *inode = lseg->pls_layout->plh_inode;
- struct pnfs_layoutdriver_type *ld = NFS_SERVER(inode)->pnfs_curr_ld;
-
- if (ld->setup_ds_info != NULL)
- ld->setup_ds_info(fl_cinfo, lseg);
-}
-
static struct pnfs_commit_array *
pnfs_lookup_commit_array(struct pnfs_ds_commit_info *fl_cinfo,
struct pnfs_layout_segment *lseg)
@@ -170,7 +159,7 @@ pnfs_lookup_commit_array(struct pnfs_ds_commit_info *fl_cinfo,
array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg);
if (!array) {
rcu_read_unlock();
- pnfs_setup_ds_info(fl_cinfo, lseg);
+ fl_cinfo->ops->setup_ds_info(fl_cinfo, lseg);
rcu_read_lock();
array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg);
}