diff options
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/super.c b/fs/super.c index aec99ddbe53f..47e554c12e76 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -260,17 +260,17 @@ int fsync_super(struct super_block *sb) | |||
260 | * that need destruction out of superblock, call generic_shutdown_super() | 260 | * that need destruction out of superblock, call generic_shutdown_super() |
261 | * and release aforementioned objects. Note: dentries and inodes _are_ | 261 | * and release aforementioned objects. Note: dentries and inodes _are_ |
262 | * taken care of and do not need specific handling. | 262 | * taken care of and do not need specific handling. |
263 | * | ||
264 | * Upon calling this function, the filesystem may no longer alter or | ||
265 | * rearrange the set of dentries belonging to this super_block, nor may it | ||
266 | * change the attachments of dentries to inodes. | ||
263 | */ | 267 | */ |
264 | void generic_shutdown_super(struct super_block *sb) | 268 | void generic_shutdown_super(struct super_block *sb) |
265 | { | 269 | { |
266 | struct dentry *root = sb->s_root; | ||
267 | struct super_operations *sop = sb->s_op; | 270 | struct super_operations *sop = sb->s_op; |
268 | 271 | ||
269 | if (root) { | 272 | if (sb->s_root) { |
270 | sb->s_root = NULL; | 273 | shrink_dcache_for_umount(sb); |
271 | shrink_dcache_parent(root); | ||
272 | shrink_dcache_sb(sb); | ||
273 | dput(root); | ||
274 | fsync_super(sb); | 274 | fsync_super(sb); |
275 | lock_super(sb); | 275 | lock_super(sb); |
276 | sb->s_flags &= ~MS_ACTIVE; | 276 | sb->s_flags &= ~MS_ACTIVE; |