summaryrefslogtreecommitdiff
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/super.c b/fs/super.c
index 601e3d63f36e..97f4824bd3db 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -898,9 +898,9 @@ static void kill_super(struct super_block *sb, int umount_root)
/* Need to clean after the sucker */
if (fs->fs_flags & FS_LITTER)
d_genocide(root);
- if (fs->fs_flags & (FS_SINGLE|FS_LITTER))
- shrink_dcache_parent(root);
+ shrink_dcache_parent(root);
dput(root);
+ fsync_dev(sb->s_dev);
lock_super(sb);
if (sop) {
if (sop->write_super && sb->s_dirt)
@@ -1074,20 +1074,6 @@ static int do_umount(struct vfsmount *mnt, int umount_root, int flags)
if( (flags&MNT_FORCE) && sb->s_op->umount_begin)
sb->s_op->umount_begin(sb);
- /*
- * Shrink dcache, then fsync. This guarantees that if the
- * filesystem is quiescent at this point, then (a) only the
- * root entry should be in use and (b) that root entry is
- * clean.
- */
- shrink_dcache_sb(sb);
- fsync_dev(sb->s_dev);
-
- if (sb->s_root->d_inode->i_state) {
- mntput(mnt);
- return -EBUSY;
- }
-
/* Something might grab it again - redo checks */
spin_lock(&dcache_lock);