Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-10 15:43:15 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-10 15:43:27 +0200
commit9b9c985a565deb149cd88c041f90c8438270ea04 (patch)
tree8d9e7810924e060f29851c749c20e264790e8d41
parent33a00bff67ed99767ab919668077af1fb81e0c0d (diff)
parentf4b3f70a20a47715891dcb5ccfc859532b4b6434 (diff)
Merge branch 'users/rgoldwyn/SLE15/for-next' into SLE15
Pull dcache fix from Goldwyn Rodrigues (bsc#1100340) suse-commit: 5a521167180c0b08b4aa520f28679463c2ce31e1
-rw-r--r--fs/namei.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c
index dd799a9e4bc2..cd2e246ba97f 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3854,11 +3854,11 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
if (error)
goto out;
- shrink_dcache_parent(dentry);
error = dir->i_op->rmdir(dir, dentry);
if (error)
goto out;
+ shrink_dcache_parent(dentry);
dentry->d_inode->i_flags |= S_DEAD;
dont_mount(dentry);
detach_mounts(dentry);
@@ -4430,8 +4430,6 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
old_dir->i_nlink >= max_links)
goto out;
}
- if (is_dir && !(flags & RENAME_EXCHANGE) && target)
- shrink_dcache_parent(new_dentry);
if (!is_dir) {
error = try_break_deleg(source, delegated_inode);
if (error)
@@ -4448,8 +4446,10 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
goto out;
if (!(flags & RENAME_EXCHANGE) && target) {
- if (is_dir)
+ if (is_dir) {
+ shrink_dcache_parent(new_dentry);
target->i_flags |= S_DEAD;
+ }
dont_mount(new_dentry);
detach_mounts(new_dentry);
}