Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e08a3c5aec5b745e844328bcbc16458b6118faf
Commit:     9e08a3c5aec5b745e844328bcbc16458b6118faf
Parent:     220bcc2afd7011b3e0569fc178331fa983c92c1b
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 8 14:10:31 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 17:20:45 2007 -0400

    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 <[EMAIL PROTECTED]>
---
 fs/nfs/nfs3proc.c |    3 +--
 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 6e05f6c..4cdc236 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)
 {
        if (nfs3_async_handle_jukebox(task, data->inode))
                return -EAGAIN;
-       if (task->tk_status >= 0)
-               nfs_post_op_update_inode(data->inode, data->res.fattr);
+       nfs_refresh_inode(data->inode, data->res.fattr);
        return 0;
 }
 
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 52af5a7..30d5dd5 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)
                rpc_restart_call(task);
                return -EAGAIN;
        }
-       if (task->tk_status >= 0)
-               nfs_post_op_update_inode(inode, data->res.fattr);
+       nfs_refresh_inode(inode, data->res.fattr);
        return 0;
 }
 
@@ -3046,7 +3045,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, 
struct rpc_cred *cred, co
        if (status == 0) {
                status = data->rpc_status;
                if (status == 0)
-                       nfs_post_op_update_inode(inode, &data->fattr);
+                       nfs_refresh_inode(inode, &data->fattr);
        }
        rpc_put_task(task);
        return status;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to