aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs/namei.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-27 16:42:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-05-28 01:02:51 -0400
commit87161faae26503a8ebe1be5ba72073ae860dbfc7 (patch)
tree3e51892e8bff5699d61459dda3fce6643495101c /fs/ufs/namei.c
parent0e54ec1c3a002a9d5e57b5ac73a934cc15a0fe06 (diff)
ufs: remove unnecessary dentry_unhash from rmdir, dir rename
ufs does not have problems with references to unlinked directories. CC: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs/namei.c')
-rw-r--r--fs/ufs/namei.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index 953ebdfc5bf7..29309e25417f 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -258,8 +258,6 @@ static int ufs_rmdir (struct inode * dir, struct dentry *dentry)
258 struct inode * inode = dentry->d_inode; 258 struct inode * inode = dentry->d_inode;
259 int err= -ENOTEMPTY; 259 int err= -ENOTEMPTY;
260 260
261 dentry_unhash(dentry);
262
263 lock_ufs(dir->i_sb); 261 lock_ufs(dir->i_sb);
264 if (ufs_empty_dir (inode)) { 262 if (ufs_empty_dir (inode)) {
265 err = ufs_unlink(dir, dentry); 263 err = ufs_unlink(dir, dentry);
@@ -284,9 +282,6 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry,
284 struct ufs_dir_entry *old_de; 282 struct ufs_dir_entry *old_de;
285 int err = -ENOENT; 283 int err = -ENOENT;
286 284
287 if (new_inode && S_ISDIR(new_inode->i_mode))
288 dentry_unhash(new_dentry);
289
290 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); 285 old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page);
291 if (!old_de) 286 if (!old_de)
292 goto out; 287 goto out;