diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/direct.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs3proc.c | 6 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 11 | ||||
-rw-r--r-- | fs/nfs/proc.c | 6 | ||||
-rw-r--r-- | fs/nfs/read.c | 13 |
5 files changed, 24 insertions, 14 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index c4bdaf15289a..9c7f66ac6cc2 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -265,9 +265,7 @@ static void nfs_direct_read_release(void *calldata) | |||
265 | } | 265 | } |
266 | 266 | ||
267 | static const struct rpc_call_ops nfs_read_direct_ops = { | 267 | static const struct rpc_call_ops nfs_read_direct_ops = { |
268 | #if defined(CONFIG_NFS_V4_1) | ||
269 | .rpc_call_prepare = nfs_read_prepare, | 268 | .rpc_call_prepare = nfs_read_prepare, |
270 | #endif /* CONFIG_NFS_V4_1 */ | ||
271 | .rpc_call_done = nfs_direct_read_result, | 269 | .rpc_call_done = nfs_direct_read_result, |
272 | .rpc_release = nfs_direct_read_release, | 270 | .rpc_release = nfs_direct_read_release, |
273 | }; | 271 | }; |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 3bcf722800f3..9d9b239329dc 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -814,6 +814,11 @@ static void nfs3_proc_read_setup(struct nfs_read_data *data, struct rpc_message | |||
814 | msg->rpc_proc = &nfs3_procedures[NFS3PROC_READ]; | 814 | msg->rpc_proc = &nfs3_procedures[NFS3PROC_READ]; |
815 | } | 815 | } |
816 | 816 | ||
817 | static void nfs3_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data) | ||
818 | { | ||
819 | rpc_call_start(task); | ||
820 | } | ||
821 | |||
817 | static int nfs3_write_done(struct rpc_task *task, struct nfs_write_data *data) | 822 | static int nfs3_write_done(struct rpc_task *task, struct nfs_write_data *data) |
818 | { | 823 | { |
819 | if (nfs3_async_handle_jukebox(task, data->inode)) | 824 | if (nfs3_async_handle_jukebox(task, data->inode)) |
@@ -884,6 +889,7 @@ const struct nfs_rpc_ops nfs_v3_clientops = { | |||
884 | .pathconf = nfs3_proc_pathconf, | 889 | .pathconf = nfs3_proc_pathconf, |
885 | .decode_dirent = nfs3_decode_dirent, | 890 | .decode_dirent = nfs3_decode_dirent, |
886 | .read_setup = nfs3_proc_read_setup, | 891 | .read_setup = nfs3_proc_read_setup, |
892 | .read_rpc_prepare = nfs3_proc_read_rpc_prepare, | ||
887 | .read_done = nfs3_read_done, | 893 | .read_done = nfs3_read_done, |
888 | .write_setup = nfs3_proc_write_setup, | 894 | .write_setup = nfs3_proc_write_setup, |
889 | .write_rpc_prepare = nfs3_proc_write_rpc_prepare, | 895 | .write_rpc_prepare = nfs3_proc_write_rpc_prepare, |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index dc910691acc0..915385fcf532 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3299,6 +3299,16 @@ static void nfs4_proc_read_setup(struct nfs_read_data *data, struct rpc_message | |||
3299 | nfs41_init_sequence(&data->args.seq_args, &data->res.seq_res, 0); | 3299 | nfs41_init_sequence(&data->args.seq_args, &data->res.seq_res, 0); |
3300 | } | 3300 | } |
3301 | 3301 | ||
3302 | static void nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data) | ||
3303 | { | ||
3304 | if (nfs4_setup_sequence(NFS_SERVER(data->inode), | ||
3305 | &data->args.seq_args, | ||
3306 | &data->res.seq_res, | ||
3307 | task)) | ||
3308 | return; | ||
3309 | rpc_call_start(task); | ||
3310 | } | ||
3311 | |||
3302 | /* Reset the the nfs_read_data to send the read to the MDS. */ | 3312 | /* Reset the the nfs_read_data to send the read to the MDS. */ |
3303 | void nfs4_reset_read(struct rpc_task *task, struct nfs_read_data *data) | 3313 | void nfs4_reset_read(struct rpc_task *task, struct nfs_read_data *data) |
3304 | { | 3314 | { |
@@ -6457,6 +6467,7 @@ const struct nfs_rpc_ops nfs_v4_clientops = { | |||
6457 | .set_capabilities = nfs4_server_capabilities, | 6467 | .set_capabilities = nfs4_server_capabilities, |
6458 | .decode_dirent = nfs4_decode_dirent, | 6468 | .decode_dirent = nfs4_decode_dirent, |
6459 | .read_setup = nfs4_proc_read_setup, | 6469 | .read_setup = nfs4_proc_read_setup, |
6470 | .read_rpc_prepare = nfs4_proc_read_rpc_prepare, | ||
6460 | .read_done = nfs4_read_done, | 6471 | .read_done = nfs4_read_done, |
6461 | .write_setup = nfs4_proc_write_setup, | 6472 | .write_setup = nfs4_proc_write_setup, |
6462 | .write_rpc_prepare = nfs4_proc_write_rpc_prepare, | 6473 | .write_rpc_prepare = nfs4_proc_write_rpc_prepare, |
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 8069b41e7f2d..a8df70742d00 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -651,6 +651,11 @@ static void nfs_proc_read_setup(struct nfs_read_data *data, struct rpc_message * | |||
651 | msg->rpc_proc = &nfs_procedures[NFSPROC_READ]; | 651 | msg->rpc_proc = &nfs_procedures[NFSPROC_READ]; |
652 | } | 652 | } |
653 | 653 | ||
654 | static void nfs_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data) | ||
655 | { | ||
656 | rpc_call_start(task); | ||
657 | } | ||
658 | |||
654 | static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data) | 659 | static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data) |
655 | { | 660 | { |
656 | if (nfs_async_handle_expired_key(task)) | 661 | if (nfs_async_handle_expired_key(task)) |
@@ -741,6 +746,7 @@ const struct nfs_rpc_ops nfs_v2_clientops = { | |||
741 | .pathconf = nfs_proc_pathconf, | 746 | .pathconf = nfs_proc_pathconf, |
742 | .decode_dirent = nfs2_decode_dirent, | 747 | .decode_dirent = nfs2_decode_dirent, |
743 | .read_setup = nfs_proc_read_setup, | 748 | .read_setup = nfs_proc_read_setup, |
749 | .read_rpc_prepare = nfs_proc_read_rpc_prepare, | ||
744 | .read_done = nfs_read_done, | 750 | .read_done = nfs_read_done, |
745 | .write_setup = nfs_proc_write_setup, | 751 | .write_setup = nfs_proc_write_setup, |
746 | .write_rpc_prepare = nfs_proc_write_rpc_prepare, | 752 | .write_rpc_prepare = nfs_proc_write_rpc_prepare, |
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 2662c0298dd0..cc1f758a7ee1 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -464,23 +464,14 @@ static void nfs_readpage_release_partial(void *calldata) | |||
464 | nfs_readdata_release(calldata); | 464 | nfs_readdata_release(calldata); |
465 | } | 465 | } |
466 | 466 | ||
467 | #if defined(CONFIG_NFS_V4_1) | ||
468 | void nfs_read_prepare(struct rpc_task *task, void *calldata) | 467 | void nfs_read_prepare(struct rpc_task *task, void *calldata) |
469 | { | 468 | { |
470 | struct nfs_read_data *data = calldata; | 469 | struct nfs_read_data *data = calldata; |
471 | 470 | NFS_PROTO(data->inode)->read_rpc_prepare(task, data); | |
472 | if (nfs4_setup_sequence(NFS_SERVER(data->inode), | ||
473 | &data->args.seq_args, &data->res.seq_res, | ||
474 | task)) | ||
475 | return; | ||
476 | rpc_call_start(task); | ||
477 | } | 471 | } |
478 | #endif /* CONFIG_NFS_V4_1 */ | ||
479 | 472 | ||
480 | static const struct rpc_call_ops nfs_read_partial_ops = { | 473 | static const struct rpc_call_ops nfs_read_partial_ops = { |
481 | #if defined(CONFIG_NFS_V4_1) | ||
482 | .rpc_call_prepare = nfs_read_prepare, | 474 | .rpc_call_prepare = nfs_read_prepare, |
483 | #endif /* CONFIG_NFS_V4_1 */ | ||
484 | .rpc_call_done = nfs_readpage_result_partial, | 475 | .rpc_call_done = nfs_readpage_result_partial, |
485 | .rpc_release = nfs_readpage_release_partial, | 476 | .rpc_release = nfs_readpage_release_partial, |
486 | }; | 477 | }; |
@@ -544,9 +535,7 @@ static void nfs_readpage_release_full(void *calldata) | |||
544 | } | 535 | } |
545 | 536 | ||
546 | static const struct rpc_call_ops nfs_read_full_ops = { | 537 | static const struct rpc_call_ops nfs_read_full_ops = { |
547 | #if defined(CONFIG_NFS_V4_1) | ||
548 | .rpc_call_prepare = nfs_read_prepare, | 538 | .rpc_call_prepare = nfs_read_prepare, |
549 | #endif /* CONFIG_NFS_V4_1 */ | ||
550 | .rpc_call_done = nfs_readpage_result_full, | 539 | .rpc_call_done = nfs_readpage_result_full, |
551 | .rpc_release = nfs_readpage_release_full, | 540 | .rpc_release = nfs_readpage_release_full, |
552 | }; | 541 | }; |