aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r--fs/nfs/proc.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index b63b6f4d14fb..fea9163d6f8e 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -178,7 +178,7 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
178} 178}
179 179
180static int 180static int
181nfs_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, struct qstr *name, 181nfs_proc_lookup(struct inode *dir, struct qstr *name,
182 struct nfs_fh *fhandle, struct nfs_fattr *fattr) 182 struct nfs_fh *fhandle, struct nfs_fattr *fattr)
183{ 183{
184 struct nfs_diropargs arg = { 184 struct nfs_diropargs arg = {
@@ -641,12 +641,14 @@ nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
641 641
642static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data) 642static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data)
643{ 643{
644 struct inode *inode = data->header->inode;
645
644 if (nfs_async_handle_expired_key(task)) 646 if (nfs_async_handle_expired_key(task))
645 return -EAGAIN; 647 return -EAGAIN;
646 648
647 nfs_invalidate_atime(data->inode); 649 nfs_invalidate_atime(inode);
648 if (task->tk_status >= 0) { 650 if (task->tk_status >= 0) {
649 nfs_refresh_inode(data->inode, data->res.fattr); 651 nfs_refresh_inode(inode, data->res.fattr);
650 /* Emulate the eof flag, which isn't normally needed in NFSv2 652 /* Emulate the eof flag, which isn't normally needed in NFSv2
651 * as it is guaranteed to always return the file attributes 653 * as it is guaranteed to always return the file attributes
652 */ 654 */
@@ -668,11 +670,13 @@ static void nfs_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_dat
668 670
669static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data) 671static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data)
670{ 672{
673 struct inode *inode = data->header->inode;
674
671 if (nfs_async_handle_expired_key(task)) 675 if (nfs_async_handle_expired_key(task))
672 return -EAGAIN; 676 return -EAGAIN;
673 677
674 if (task->tk_status >= 0) 678 if (task->tk_status >= 0)
675 nfs_post_op_update_inode_force_wcc(data->inode, data->res.fattr); 679 nfs_post_op_update_inode_force_wcc(inode, data->res.fattr);
676 return 0; 680 return 0;
677} 681}
678 682
@@ -688,8 +692,13 @@ static void nfs_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_write_d
688 rpc_call_start(task); 692 rpc_call_start(task);
689} 693}
690 694
695static void nfs_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commit_data *data)
696{
697 BUG();
698}
699
691static void 700static void
692nfs_proc_commit_setup(struct nfs_write_data *data, struct rpc_message *msg) 701nfs_proc_commit_setup(struct nfs_commit_data *data, struct rpc_message *msg)
693{ 702{
694 BUG(); 703 BUG();
695} 704}
@@ -733,6 +742,7 @@ const struct nfs_rpc_ops nfs_v2_clientops = {
733 .file_inode_ops = &nfs_file_inode_operations, 742 .file_inode_ops = &nfs_file_inode_operations,
734 .file_ops = &nfs_file_operations, 743 .file_ops = &nfs_file_operations,
735 .getroot = nfs_proc_get_root, 744 .getroot = nfs_proc_get_root,
745 .submount = nfs_submount,
736 .getattr = nfs_proc_getattr, 746 .getattr = nfs_proc_getattr,
737 .setattr = nfs_proc_setattr, 747 .setattr = nfs_proc_setattr,
738 .lookup = nfs_proc_lookup, 748 .lookup = nfs_proc_lookup,
@@ -764,6 +774,7 @@ const struct nfs_rpc_ops nfs_v2_clientops = {
764 .write_rpc_prepare = nfs_proc_write_rpc_prepare, 774 .write_rpc_prepare = nfs_proc_write_rpc_prepare,
765 .write_done = nfs_write_done, 775 .write_done = nfs_write_done,
766 .commit_setup = nfs_proc_commit_setup, 776 .commit_setup = nfs_proc_commit_setup,
777 .commit_rpc_prepare = nfs_proc_commit_rpc_prepare,
767 .lock = nfs_proc_lock, 778 .lock = nfs_proc_lock,
768 .lock_check_bounds = nfs_lock_check_bounds, 779 .lock_check_bounds = nfs_lock_check_bounds,
769 .close_context = nfs_close_context, 780 .close_context = nfs_close_context,