diff options
Diffstat (limited to 'fs/romfs/super.c')
-rw-r--r-- | fs/romfs/super.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/romfs/super.c b/fs/romfs/super.c index c59b230d55b4..42d7a344472f 100644 --- a/fs/romfs/super.c +++ b/fs/romfs/super.c @@ -583,16 +583,18 @@ static int romfs_init_fs_context(struct fs_context *fc) */ static void romfs_kill_sb(struct super_block *sb) { + generic_shutdown_super(sb); + #ifdef CONFIG_ROMFS_ON_MTD if (sb->s_mtd) { - kill_mtd_super(sb); - return; + put_mtd_device(sb->s_mtd); + sb->s_mtd = NULL; } #endif #ifdef CONFIG_ROMFS_ON_BLOCK if (sb->s_bdev) { - kill_block_super(sb); - return; + sync_blockdev(sb->s_bdev); + blkdev_put(sb->s_bdev, sb->s_type); } #endif } |