diff options
Diffstat (limited to 'fs/nfs/nfs3proc.c')
-rw-r--r-- | fs/nfs/nfs3proc.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index c7ca5d70870b..4cdc2361a669 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -166,6 +166,7 @@ nfs3_proc_lookup(struct inode *dir, struct qstr *name, | |||
166 | nfs_fattr_init(&dir_attr); | 166 | nfs_fattr_init(&dir_attr); |
167 | nfs_fattr_init(fattr); | 167 | nfs_fattr_init(fattr); |
168 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); | 168 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |
169 | nfs_refresh_inode(dir, &dir_attr); | ||
169 | if (status >= 0 && !(fattr->valid & NFS_ATTR_FATTR)) { | 170 | if (status >= 0 && !(fattr->valid & NFS_ATTR_FATTR)) { |
170 | msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR]; | 171 | msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR]; |
171 | msg.rpc_argp = fhandle; | 172 | msg.rpc_argp = fhandle; |
@@ -173,8 +174,6 @@ nfs3_proc_lookup(struct inode *dir, struct qstr *name, | |||
173 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); | 174 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |
174 | } | 175 | } |
175 | dprintk("NFS reply lookup: %d\n", status); | 176 | dprintk("NFS reply lookup: %d\n", status); |
176 | if (status >= 0) | ||
177 | status = nfs_refresh_inode(dir, &dir_attr); | ||
178 | return status; | 177 | return status; |
179 | } | 178 | } |
180 | 179 | ||
@@ -607,6 +606,9 @@ nfs3_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, | |||
607 | 606 | ||
608 | nfs_fattr_init(&dir_attr); | 607 | nfs_fattr_init(&dir_attr); |
609 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); | 608 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |
609 | |||
610 | nfs_invalidate_atime(dir); | ||
611 | |||
610 | nfs_refresh_inode(dir, &dir_attr); | 612 | nfs_refresh_inode(dir, &dir_attr); |
611 | dprintk("NFS reply readdir: %d\n", status); | 613 | dprintk("NFS reply readdir: %d\n", status); |
612 | return status; | 614 | return status; |
@@ -724,9 +726,9 @@ static int nfs3_read_done(struct rpc_task *task, struct nfs_read_data *data) | |||
724 | { | 726 | { |
725 | if (nfs3_async_handle_jukebox(task, data->inode)) | 727 | if (nfs3_async_handle_jukebox(task, data->inode)) |
726 | return -EAGAIN; | 728 | return -EAGAIN; |
727 | /* Call back common NFS readpage processing */ | 729 | |
728 | if (task->tk_status >= 0) | 730 | nfs_invalidate_atime(data->inode); |
729 | nfs_refresh_inode(data->inode, &data->fattr); | 731 | nfs_refresh_inode(data->inode, &data->fattr); |
730 | return 0; | 732 | return 0; |
731 | } | 733 | } |
732 | 734 | ||
@@ -747,7 +749,7 @@ static int nfs3_write_done(struct rpc_task *task, struct nfs_write_data *data) | |||
747 | if (nfs3_async_handle_jukebox(task, data->inode)) | 749 | if (nfs3_async_handle_jukebox(task, data->inode)) |
748 | return -EAGAIN; | 750 | return -EAGAIN; |
749 | if (task->tk_status >= 0) | 751 | if (task->tk_status >= 0) |
750 | nfs_post_op_update_inode(data->inode, data->res.fattr); | 752 | nfs_post_op_update_inode_force_wcc(data->inode, data->res.fattr); |
751 | return 0; | 753 | return 0; |
752 | } | 754 | } |
753 | 755 | ||
@@ -775,8 +777,7 @@ static int nfs3_commit_done(struct rpc_task *task, struct nfs_write_data *data) | |||
775 | { | 777 | { |
776 | if (nfs3_async_handle_jukebox(task, data->inode)) | 778 | if (nfs3_async_handle_jukebox(task, data->inode)) |
777 | return -EAGAIN; | 779 | return -EAGAIN; |
778 | if (task->tk_status >= 0) | 780 | nfs_refresh_inode(data->inode, data->res.fattr); |
779 | nfs_post_op_update_inode(data->inode, data->res.fattr); | ||
780 | return 0; | 781 | return 0; |
781 | } | 782 | } |
782 | 783 | ||