Commit c733c49c authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Don't apply change_info4 twice on rename within a directory

If a file is renamed, but stays in the same directory, we will still receive
2 change_info4 structures describing the change to that directory, but we
only want to apply it once.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 2dfc6173
...@@ -4159,8 +4159,11 @@ static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir, ...@@ -4159,8 +4159,11 @@ static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir,
if (nfs4_async_handle_error(task, res->server, NULL, &data->timeout) == -EAGAIN) if (nfs4_async_handle_error(task, res->server, NULL, &data->timeout) == -EAGAIN)
return 0; return 0;
update_changeattr(old_dir, &res->old_cinfo); if (task->tk_status == 0) {
update_changeattr(new_dir, &res->new_cinfo); update_changeattr(old_dir, &res->old_cinfo);
if (new_dir != old_dir)
update_changeattr(new_dir, &res->new_cinfo);
}
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment