aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-27 16:42:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-05-28 01:02:52 -0400
commit4e82d61b6ac4966b3b61c2d97ddf04928f037be1 (patch)
tree3700b906aa42f7f1a41656cdfdae9245c9a618fa /fs/hfs
parent8aaa0f5431d8d1181b3d1a1bcd8f3330c0ce275f (diff)
hfs: remove unnecessary dentry_unhash on rmdir, dir rename
hfs does not have problems with references to unlinked directories. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfs')
-rw-r--r--fs/hfs/dir.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c
index 1cb70cdba2c1..b4d70b13be92 100644
--- a/fs/hfs/dir.c
+++ b/fs/hfs/dir.c
@@ -253,9 +253,6 @@ static int hfs_remove(struct inode *dir, struct dentry *dentry)
253 struct inode *inode = dentry->d_inode; 253 struct inode *inode = dentry->d_inode;
254 int res; 254 int res;
255 255
256 if (S_ISDIR(inode->i_mode))
257 dentry_unhash(dentry);
258
259 if (S_ISDIR(inode->i_mode) && inode->i_size != 2) 256 if (S_ISDIR(inode->i_mode) && inode->i_size != 2)
260 return -ENOTEMPTY; 257 return -ENOTEMPTY;
261 res = hfs_cat_delete(inode->i_ino, dir, &dentry->d_name); 258 res = hfs_cat_delete(inode->i_ino, dir, &dentry->d_name);
@@ -286,9 +283,6 @@ static int hfs_rename(struct inode *old_dir, struct dentry *old_dentry,
286 283
287 /* Unlink destination if it already exists */ 284 /* Unlink destination if it already exists */
288 if (new_dentry->d_inode) { 285 if (new_dentry->d_inode) {
289 if (S_ISDIR(new_dentry->d_inode->i_mode))
290 dentry_unhash(new_dentry);
291
292 res = hfs_remove(new_dir, new_dentry); 286 res = hfs_remove(new_dir, new_dentry);
293 if (res) 287 if (res)
294 return res; 288 return res;