diff options
author | Sage Weil <sage@newdream.net> | 2011-05-24 16:06:20 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-26 07:26:57 -0400 |
commit | 8cbfa53b1cd08ae3b315bbb55f7396f5a6a6a4f7 (patch) | |
tree | 29d02280724a1eb446b5920d041466b26f92c80c /fs | |
parent | 052e2a1ba2d07e724ae9cc0608389292276cb77a (diff) |
exofs: remove unnecessary dentry_unhash on rmdir/rename_dir
Exofs has no problems with lingering references to unlinked directory
inodes.
CC: Benny Halevy <bhalevy@panasas.com>
CC: osd-dev@open-osd.org
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exofs/namei.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c index de252e5acf05..4d70db110cfc 100644 --- a/fs/exofs/namei.c +++ b/fs/exofs/namei.c | |||
@@ -227,8 +227,6 @@ static int exofs_rmdir(struct inode *dir, struct dentry *dentry) | |||
227 | struct inode *inode = dentry->d_inode; | 227 | struct inode *inode = dentry->d_inode; |
228 | int err = -ENOTEMPTY; | 228 | int err = -ENOTEMPTY; |
229 | 229 | ||
230 | dentry_unhash(dentry); | ||
231 | |||
232 | if (exofs_empty_dir(inode)) { | 230 | if (exofs_empty_dir(inode)) { |
233 | err = exofs_unlink(dir, dentry); | 231 | err = exofs_unlink(dir, dentry); |
234 | if (!err) { | 232 | if (!err) { |
@@ -251,9 +249,6 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
251 | struct exofs_dir_entry *old_de; | 249 | struct exofs_dir_entry *old_de; |
252 | int err = -ENOENT; | 250 | int err = -ENOENT; |
253 | 251 | ||
254 | if (new_inode && S_ISDIR(new_inode->i_mode)) | ||
255 | dentry_unhash(new_dentry); | ||
256 | |||
257 | old_de = exofs_find_entry(old_dir, old_dentry, &old_page); | 252 | old_de = exofs_find_entry(old_dir, old_dentry, &old_page); |
258 | if (!old_de) | 253 | if (!old_de) |
259 | goto out; | 254 | goto out; |