summaryrefslogtreecommitdiffstats
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@netapp.com>2014-05-06 09:12:33 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-05-28 18:40:43 -0400
commit6f92fa4581f1c26562f80dc686b3c9ea76556911 (patch)
tree5b6fcffb14d1738f235b01ffa2cf53b9e858faa9 /fs/nfs/read.c
parent0eecb2145c1ce18e36617008424a93836ad0a3bd (diff)
downloadop-kernel-dev-6f92fa4581f1c26562f80dc686b3c9ea76556911.zip
op-kernel-dev-6f92fa4581f1c26562f80dc686b3c9ea76556911.tar.gz
NFS: Create a common rpc_call_ops struct
The read and write paths set up this struct in exactly the same way, so create a single shared struct. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index bc78bd2..a33490c 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -29,7 +29,6 @@
#define NFSDBG_FACILITY NFSDBG_PAGECACHE
static const struct nfs_pageio_ops nfs_pageio_read_ops;
-static const struct rpc_call_ops nfs_read_common_ops;
static const struct nfs_pgio_completion_ops nfs_async_read_completion_ops;
static const struct nfs_rw_ops nfs_rw_read_ops;
@@ -314,7 +313,7 @@ static int nfs_pagein_multi(struct nfs_pageio_descriptor *desc,
nfs_list_remove_request(req);
nfs_list_add_request(req, &hdr->pages);
- desc->pg_rpc_callops = &nfs_read_common_ops;
+ desc->pg_rpc_callops = &nfs_pgio_common_ops;
return 0;
}
@@ -343,7 +342,7 @@ static int nfs_pagein_one(struct nfs_pageio_descriptor *desc,
nfs_read_rpcsetup(data, desc->pg_count, 0);
list_add(&data->list, &hdr->rpc_list);
- desc->pg_rpc_callops = &nfs_read_common_ops;
+ desc->pg_rpc_callops = &nfs_pgio_common_ops;
return 0;
}
@@ -443,12 +442,6 @@ static void nfs_readpage_result(struct rpc_task *task, struct nfs_pgio_data *dat
nfs_readpage_retry(task, data);
}
-static const struct rpc_call_ops nfs_read_common_ops = {
- .rpc_call_prepare = nfs_pgio_prepare,
- .rpc_call_done = nfs_pgio_result,
- .rpc_release = nfs_pgio_release,
-};
-
/*
* Read a page over NFS.
* We read the page synchronously in the following case:
OpenPOWER on IntegriCloud