Thread (297 messages) 297 messages, 1 author, 2018-01-18

[added to the 4.1 stable tree] NFS: Fix a typo in nfs_rename()

From: Sasha Levin <hidden>
Date: 2018-01-18 21:04:38
Subsystem: filesystems (vfs and infrastructure), nfs, sunrpc, and lockd clients, the rest · Maintainers: Alexander Viro, Christian Brauner, Trond Myklebust, Anna Schumaker, Linus Torvalds

From: Trond Myklebust <redacted>

This patch has been added to the  stable tree. If you have any
objections, please let us know.

===============

[ 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 <redacted>
Signed-off-by: Anna Schumaker <redacted>
Signed-off-by: Sasha Levin <redacted>
---
 fs/nfs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 1484ae1907c6..d2cb63259560 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2076,7 +2076,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);
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help