Thread (1 message) 1 message, 1 author, 2011-05-27
STALE5473d

[uml-devel] [PATCH 14/26] hostfs: remove unnecessary dentry_unhash on rmdir, dir rename

From: Sage Weil <hidden>
Date: 2011-05-27 20:41:52
Also in: linux-fsdevel
Subsystem: filesystems (vfs and infrastructure), the rest, user-mode linux (uml) · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds, Richard Weinberger, Anton Ivanov, Johannes Berg

hostfs does not have problems with references to unlinked directories.

CC: Jeff Dike <redacted>
CC: Richard Weinberger <richard@nod.at>
CC: user-mode-linux-devel@lists.sourceforge.net
Signed-off-by: Sage Weil <redacted>
---
 fs/hostfs/hostfs_kern.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index e6816b9..2638c83 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -683,8 +683,6 @@ int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
 	char *file;
 	int err;
 
-	dentry_unhash(dentry);
-
 	if ((file = dentry_name(dentry)) == NULL)
 		return -ENOMEM;
 	err = do_rmdir(file);
@@ -738,9 +736,6 @@ int hostfs_rename(struct inode *from_ino, struct dentry *from,
 	char *from_name, *to_name;
 	int err;
 
-	if (to->d_inode && S_ISDIR(to->d_inode->i_mode))
-		dentry_unhash(to);
-
 	if ((from_name = dentry_name(from)) == NULL)
 		return -ENOMEM;
 	if ((to_name = dentry_name(to)) == NULL) {
-- 
1.7.0


------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help