mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
omfs: remove unnecessary dentry_unhash on rmdir, dir rneame
omfs does not have problems with references to unlinked directories. CC: Bob Copeland <[email protected]> CC: [email protected] Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
7020739df2
commit
8aaa0f5431
1 changed files with 3 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue