From: Trond Myklebust Date: Mon, 6 Nov 2017 20:28:04 +0000 (-0500) Subject: NFS: Fix a typo in nfs_rename() X-Git-Tag: archive/raspbian/4.9.80-2+rpi1~7^2~797 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=509e9b805c52d799c9fc44ca0a32fa79fc03befc;p=linux-4.9.git NFS: Fix a typo in nfs_rename() [ Upstream commit d803224c84be067754db7fa58a93f36f61566493 ] On successful rename, the "old_dentry" is retained and is attached to the "new_dir", so we need to call nfs_set_verifier() accordingly. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 65566d5fcf39..1e5321d1ed22 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2098,7 +2098,7 @@ out: if (new_inode != NULL) nfs_drop_nlink(new_inode); d_move(old_dentry, new_dentry); - nfs_set_verifier(new_dentry, + nfs_set_verifier(old_dentry, nfs_save_change_attribute(new_dir)); } else if (error == -ENOENT) nfs_dentry_handle_enoent(old_dentry);