]> git.itanic.dy.fi Git - linux-stable/commitdiff
NFS: Fix a typo in nfs_rename()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 6 Nov 2017 20:28:04 +0000 (15:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Dec 2017 09:32:30 +0000 (10:32 +0100)
[ 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 <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/dir.c

index 90526b2148f0de57dd90598681992d4ba4c1adbd..de98eb5be9dbc98077807a47e14f0d6fcb282be0 100644 (file)
@@ -2063,7 +2063,7 @@ int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                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);