浏览代码

NFSv4: Don't call update_changeattr() unless the unlink is successful

If the unlink wasn't successful, then the directory has presumably not
changed.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Trond Myklebust 8 年之前
父节点
当前提交
c40d52fe1c
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      fs/nfs/nfs4proc.c

+ 2 - 1
fs/nfs/nfs4proc.c

@@ -4125,7 +4125,8 @@ static int nfs4_proc_unlink_done(struct rpc_task *task, struct inode *dir)
 	if (nfs4_async_handle_error(task, res->server, NULL,
 	if (nfs4_async_handle_error(task, res->server, NULL,
 				    &data->timeout) == -EAGAIN)
 				    &data->timeout) == -EAGAIN)
 		return 0;
 		return 0;
-	update_changeattr(dir, &res->cinfo);
+	if (task->tk_status == 0)
+		update_changeattr(dir, &res->cinfo);
 	return 1;
 	return 1;
 }
 }