提交 9e08a3c5 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 220bcc2a
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册