aboutsummaryrefslogtreecommitdiffstats
path: root/fs/omfs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-27 16:42:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-05-28 01:02:52 -0400
commit8aaa0f5431d8d1181b3d1a1bcd8f3330c0ce275f (patch)
tree653c2e48f12f2f263a333ba7121679df372d9730 /fs/omfs
parent7020739df2fa0e2126fc9739987e016860f14323 (diff)
omfs: remove unnecessary dentry_unhash on rmdir, dir rneame
omfs does not have problems with references to unlinked directories. CC: Bob Copeland <me@bobcopeland.com> CC: linux-karma-devel@lists.sourceforge.net Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/omfs')
-rw-r--r--fs/omfs/dir.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c
index c368360c35a1..3b8d3979e03b 100644
--- a/fs/omfs/dir.c
+++ b/fs/omfs/dir.c
@@ -241,11 +241,9 @@ static int omfs_remove(struct inode *dir, struct dentry *dentry)
241 int ret; 241 int ret;
242 242
243 243
244 if (S_ISDIR(inode->i_mode)) { 244 if (S_ISDIR(inode->i_mode) &&
245 dentry_unhash(dentry); 245 !omfs_dir_is_empty(inode))
246 if (!omfs_dir_is_empty(inode)) 246 return -ENOTEMPTY;
247 return -ENOTEMPTY;
248 }
249 247
250 ret = omfs_delete_entry(dentry); 248 ret = omfs_delete_entry(dentry);
251 if (ret) 249 if (ret)
@@ -382,9 +380,6 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry,
382 int err; 380 int err;
383 381
384 if (new_inode) { 382 if (new_inode) {
385 if (S_ISDIR(new_inode->i_mode))
386 dentry_unhash(new_dentry);
387
388 /* overwriting existing file/dir */ 383 /* overwriting existing file/dir */
389 err = omfs_remove(new_dir, new_dentry); 384 err = omfs_remove(new_dir, new_dentry);
390 if (err) 385 if (err)