diff options
author | Anna Schumaker <Anna.Schumaker@netapp.com> | 2014-05-06 09:12:31 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-05-28 18:40:28 -0400 |
commit | a4cdda59111f92000297e0d3edb1e0e08ba3549b (patch) | |
tree | 82d09653ae72768829c50c4138b7dc35b6c9f86b /fs/nfs/nfs3proc.c | |
parent | 4a0de55c565a36cac8422b76a948c4634a90781e (diff) |
NFS: Create a common pgio_rpc_prepare function
The read and write paths do exactly the same thing for the rpc_prepare
rpc_op. This patch combines them together into a single function.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs3proc.c')
-rw-r--r-- | fs/nfs/nfs3proc.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index d235369c3dfb..e7daa42bbc86 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -812,7 +812,7 @@ static void nfs3_proc_read_setup(struct nfs_pgio_data *data, struct rpc_message | |||
812 | msg->rpc_proc = &nfs3_procedures[NFS3PROC_READ]; | 812 | msg->rpc_proc = &nfs3_procedures[NFS3PROC_READ]; |
813 | } | 813 | } |
814 | 814 | ||
815 | static int nfs3_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data) | 815 | static int nfs3_proc_pgio_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data) |
816 | { | 816 | { |
817 | rpc_call_start(task); | 817 | rpc_call_start(task); |
818 | return 0; | 818 | return 0; |
@@ -834,12 +834,6 @@ static void nfs3_proc_write_setup(struct nfs_pgio_data *data, struct rpc_message | |||
834 | msg->rpc_proc = &nfs3_procedures[NFS3PROC_WRITE]; | 834 | msg->rpc_proc = &nfs3_procedures[NFS3PROC_WRITE]; |
835 | } | 835 | } |
836 | 836 | ||
837 | static int nfs3_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data) | ||
838 | { | ||
839 | rpc_call_start(task); | ||
840 | return 0; | ||
841 | } | ||
842 | |||
843 | static void nfs3_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commit_data *data) | 837 | static void nfs3_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commit_data *data) |
844 | { | 838 | { |
845 | rpc_call_start(task); | 839 | rpc_call_start(task); |
@@ -946,11 +940,10 @@ const struct nfs_rpc_ops nfs_v3_clientops = { | |||
946 | .fsinfo = nfs3_proc_fsinfo, | 940 | .fsinfo = nfs3_proc_fsinfo, |
947 | .pathconf = nfs3_proc_pathconf, | 941 | .pathconf = nfs3_proc_pathconf, |
948 | .decode_dirent = nfs3_decode_dirent, | 942 | .decode_dirent = nfs3_decode_dirent, |
943 | .pgio_rpc_prepare = nfs3_proc_pgio_rpc_prepare, | ||
949 | .read_setup = nfs3_proc_read_setup, | 944 | .read_setup = nfs3_proc_read_setup, |
950 | .read_rpc_prepare = nfs3_proc_read_rpc_prepare, | ||
951 | .read_done = nfs3_read_done, | 945 | .read_done = nfs3_read_done, |
952 | .write_setup = nfs3_proc_write_setup, | 946 | .write_setup = nfs3_proc_write_setup, |
953 | .write_rpc_prepare = nfs3_proc_write_rpc_prepare, | ||
954 | .write_done = nfs3_write_done, | 947 | .write_done = nfs3_write_done, |
955 | .commit_setup = nfs3_proc_commit_setup, | 948 | .commit_setup = nfs3_proc_commit_setup, |
956 | .commit_rpc_prepare = nfs3_proc_commit_rpc_prepare, | 949 | .commit_rpc_prepare = nfs3_proc_commit_rpc_prepare, |