diff options
author | Sage Weil <sage@newdream.net> | 2011-05-27 16:41:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-28 01:02:50 -0400 |
commit | 873ae4d5a8b282c6e2bbc09c6d59eeb1bec97ef7 (patch) | |
tree | 9623abaed579e054d8a5ea441e8d54fb3467f1eb /fs/sysv | |
parent | 76f0b8d2d2c8d417623142069cdfde1cf1e108d5 (diff) |
sysv: remove unnecessary dentry_unhash from rmdir, dir rename
sysv does not have problems with references to unlinked directories.
CC: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sysv')
-rw-r--r-- | fs/sysv/namei.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/sysv/namei.c b/fs/sysv/namei.c index e2cc6756f3b1..e474fbcf8bde 100644 --- a/fs/sysv/namei.c +++ b/fs/sysv/namei.c | |||
@@ -196,8 +196,6 @@ static int sysv_rmdir(struct inode * dir, struct dentry * dentry) | |||
196 | struct inode *inode = dentry->d_inode; | 196 | struct inode *inode = dentry->d_inode; |
197 | int err = -ENOTEMPTY; | 197 | int err = -ENOTEMPTY; |
198 | 198 | ||
199 | dentry_unhash(dentry); | ||
200 | |||
201 | if (sysv_empty_dir(inode)) { | 199 | if (sysv_empty_dir(inode)) { |
202 | err = sysv_unlink(dir, dentry); | 200 | err = sysv_unlink(dir, dentry); |
203 | if (!err) { | 201 | if (!err) { |
@@ -224,9 +222,6 @@ static int sysv_rename(struct inode * old_dir, struct dentry * old_dentry, | |||
224 | struct sysv_dir_entry * old_de; | 222 | struct sysv_dir_entry * old_de; |
225 | int err = -ENOENT; | 223 | int err = -ENOENT; |
226 | 224 | ||
227 | if (new_inode && S_ISDIR(new_inode->i_mode)) | ||
228 | dentry_unhash(new_dentry); | ||
229 | |||
230 | old_de = sysv_find_entry(old_dentry, &old_page); | 225 | old_de = sysv_find_entry(old_dentry, &old_page); |
231 | if (!old_de) | 226 | if (!old_de) |
232 | goto out; | 227 | goto out; |