diff options
author | Sage Weil <sage@newdream.net> | 2011-05-27 13:42:04 -0700 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-28 01:02:52 -0400 |
commit | 8aaa0f5431d8d1181b3d1a1bcd8f3330c0ce275f (patch) | |
tree | 653c2e48f12f2f263a333ba7121679df372d9730 | |
parent | 7020739df2fa0e2126fc9739987e016860f14323 (diff) | |
download | blackbird-op-linux-8aaa0f5431d8d1181b3d1a1bcd8f3330c0ce275f.tar.gz blackbird-op-linux-8aaa0f5431d8d1181b3d1a1bcd8f3330c0ce275f.zip |
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>
-rw-r--r-- | fs/omfs/dir.c | 11 |
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) int ret; - if (S_ISDIR(inode->i_mode)) { - dentry_unhash(dentry); - if (!omfs_dir_is_empty(inode)) - return -ENOTEMPTY; - } + if (S_ISDIR(inode->i_mode) && + !omfs_dir_is_empty(inode)) + return -ENOTEMPTY; ret = omfs_delete_entry(dentry); if (ret) @@ -382,9 +380,6 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry, int err; if (new_inode) { - if (S_ISDIR(new_inode->i_mode)) - dentry_unhash(new_dentry); - /* overwriting existing file/dir */ err = omfs_remove(new_dir, new_dentry); if (err) |