diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-08 14:10:31 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:20:45 -0400 |
commit | 9e08a3c5aec5b745e844328bcbc16458b6118faf (patch) | |
tree | 0715485e16ddee34478cdf1ac8432944f6cc354e /fs/nfs | |
parent | 220bcc2afd7011b3e0569fc178331fa983c92c1b (diff) |
NFS: Use nfs_refresh_inode() in ops that aren't expected to change the inode
nfs_post_op_update_inode() is really only meant to be used if we expect the
inode and its attributes to have changed in some way.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs3proc.c | 3 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 6e05f6c9c910..4cdc2361a669 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -777,8 +777,7 @@ static int nfs3_commit_done(struct rpc_task *task, struct nfs_write_data *data) | |||
777 | { | 777 | { |
778 | if (nfs3_async_handle_jukebox(task, data->inode)) | 778 | if (nfs3_async_handle_jukebox(task, data->inode)) |
779 | return -EAGAIN; | 779 | return -EAGAIN; |
780 | if (task->tk_status >= 0) | 780 | nfs_refresh_inode(data->inode, data->res.fattr); |
781 | nfs_post_op_update_inode(data->inode, data->res.fattr); | ||
782 | return 0; | 781 | return 0; |
783 | } | 782 | } |
784 | 783 | ||
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 52af5a7d679e..30d5dd5735cd 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2475,8 +2475,7 @@ static int nfs4_commit_done(struct rpc_task *task, struct nfs_write_data *data) | |||
2475 | rpc_restart_call(task); | 2475 | rpc_restart_call(task); |
2476 | return -EAGAIN; | 2476 | return -EAGAIN; |
2477 | } | 2477 | } |
2478 | if (task->tk_status >= 0) | 2478 | nfs_refresh_inode(inode, data->res.fattr); |
2479 | nfs_post_op_update_inode(inode, data->res.fattr); | ||
2480 | return 0; | 2479 | return 0; |
2481 | } | 2480 | } |
2482 | 2481 | ||
@@ -3046,7 +3045,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, co | |||
3046 | if (status == 0) { | 3045 | if (status == 0) { |
3047 | status = data->rpc_status; | 3046 | status = data->rpc_status; |
3048 | if (status == 0) | 3047 | if (status == 0) |
3049 | nfs_post_op_update_inode(inode, &data->fattr); | 3048 | nfs_refresh_inode(inode, &data->fattr); |
3050 | } | 3049 | } |
3051 | rpc_put_task(task); | 3050 | rpc_put_task(task); |
3052 | return status; | 3051 | return status; |