From: Trond Myklebust Date: Wed, 11 Jan 2017 17:36:11 +0000 (-0500) Subject: NFSv4: Don't call update_changeattr() unless the unlink is successful X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c40d52fe1c2ba25dcb8cd207c8d26ef5f57f0476;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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; }