summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-01-11 20:36:11 +0300
committerTrond Myklebust <trond.myklebust@primarydata.com>2017-01-12 23:51:18 +0300
commitc40d52fe1c2ba25dcb8cd207c8d26ef5f57f0476 (patch)
tree5958988cd1674e2a7e3214b811409b9cea029fb3 /fs
parentc733c49c32624f927f443be6dbabb387006bbe42 (diff)
downloadlinux-c40d52fe1c2ba25dcb8cd207c8d26ef5f57f0476.tar.xz
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 1e797bf74aaf..6a35204affa4 100644
--- a/fs/nfs/nfs4proc.c
+++ b/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,
&data->timeout) == -EAGAIN)
return 0;
- update_changeattr(dir, &res->cinfo);
+ if (task->tk_status == 0)
+ update_changeattr(dir, &res->cinfo);
return 1;
}