aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/super.c b/fs/super.c
index 6689dded3c84..5a347a4f673a 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -665,16 +665,6 @@ static int test_bdev_super(struct super_block *s, void *data)
665 return (void *)s->s_bdev == data; 665 return (void *)s->s_bdev == data;
666} 666}
667 667
668static void bdev_uevent(struct block_device *bdev, enum kobject_action action)
669{
670 if (bdev->bd_disk) {
671 if (bdev->bd_part)
672 kobject_uevent(&bdev->bd_part->kobj, action, NULL);
673 else
674 kobject_uevent(&bdev->bd_disk->kobj, action, NULL);
675 }
676}
677
678struct super_block *get_sb_bdev(struct file_system_type *fs_type, 668struct super_block *get_sb_bdev(struct file_system_type *fs_type,
679 int flags, const char *dev_name, void *data, 669 int flags, const char *dev_name, void *data,
680 int (*fill_super)(struct super_block *, void *, int)) 670 int (*fill_super)(struct super_block *, void *, int))
@@ -717,10 +707,8 @@ struct super_block *get_sb_bdev(struct file_system_type *fs_type,
717 up_write(&s->s_umount); 707 up_write(&s->s_umount);
718 deactivate_super(s); 708 deactivate_super(s);
719 s = ERR_PTR(error); 709 s = ERR_PTR(error);
720 } else { 710 } else
721 s->s_flags |= MS_ACTIVE; 711 s->s_flags |= MS_ACTIVE;
722 bdev_uevent(bdev, KOBJ_MOUNT);
723 }
724 } 712 }
725 713
726 return s; 714 return s;
@@ -736,7 +724,6 @@ void kill_block_super(struct super_block *sb)
736{ 724{
737 struct block_device *bdev = sb->s_bdev; 725 struct block_device *bdev = sb->s_bdev;
738 726
739 bdev_uevent(bdev, KOBJ_UMOUNT);
740 generic_shutdown_super(sb); 727 generic_shutdown_super(sb);
741 sync_blockdev(bdev); 728 sync_blockdev(bdev);
742 close_bdev_excl(bdev); 729 close_bdev_excl(bdev);