Commit 89c122236e60747f920008c9cf4e9cbde3333e50

Authored by Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  autofs4: bogus dentry_unhash() added in ->unlink()
  vfs: shrink_dcache_parent before rmdir, dir rename

Showing 2 changed files Side-by-side Diff

... ... @@ -583,8 +583,6 @@
583 583 if (!autofs4_oz_mode(sbi) && !capable(CAP_SYS_ADMIN))
584 584 return -EACCES;
585 585  
586   - dentry_unhash(dentry);
587   -
588 586 if (atomic_dec_and_test(&ino->count)) {
589 587 p_ino = autofs4_dentry_ino(dentry->d_parent);
590 588 if (p_ino && dentry->d_parent != dentry)
... ... @@ -2579,6 +2579,7 @@
2579 2579 if (error)
2580 2580 goto out;
2581 2581  
  2582 + shrink_dcache_parent(dentry);
2582 2583 error = dir->i_op->rmdir(dir, dentry);
2583 2584 if (error)
2584 2585 goto out;
... ... @@ -2993,6 +2994,8 @@
2993 2994 if (d_mountpoint(old_dentry) || d_mountpoint(new_dentry))
2994 2995 goto out;
2995 2996  
  2997 + if (target)
  2998 + shrink_dcache_parent(new_dentry);
2996 2999 error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry);
2997 3000 if (error)
2998 3001 goto out;