aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/super.c15
-rw-r--r--include/linux/kobject.h6
-rw-r--r--lib/kobject_uevent.c4
3 files changed, 3 insertions, 22 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);
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index baf5251d9f63..e6926b327538 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -42,10 +42,8 @@ enum kobject_action {
42 KOBJ_ADD = (__force kobject_action_t) 0x01, /* add event, for hotplug */ 42 KOBJ_ADD = (__force kobject_action_t) 0x01, /* add event, for hotplug */
43 KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* remove event, for hotplug */ 43 KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* remove event, for hotplug */
44 KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* a sysfs attribute file has changed */ 44 KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* a sysfs attribute file has changed */
45 KOBJ_MOUNT = (__force kobject_action_t) 0x04, /* mount event for block devices */ 45 KOBJ_OFFLINE = (__force kobject_action_t) 0x04, /* offline event for hotplug devices */
46 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices */ 46 KOBJ_ONLINE = (__force kobject_action_t) 0x05, /* online event for hotplug devices */
47 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* offline event for hotplug devices */
48 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* online event for hotplug devices */
49}; 47};
50 48
51struct kobject { 49struct kobject {
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 1f90eea7eebc..845bf67d94ca 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -39,10 +39,6 @@ static char *action_to_string(enum kobject_action action)
39 return "remove"; 39 return "remove";
40 case KOBJ_CHANGE: 40 case KOBJ_CHANGE:
41 return "change"; 41 return "change";
42 case KOBJ_MOUNT:
43 return "mount";
44 case KOBJ_UMOUNT:
45 return "umount";
46 case KOBJ_OFFLINE: 42 case KOBJ_OFFLINE:
47 return "offline"; 43 return "offline";
48 case KOBJ_ONLINE: 44 case KOBJ_ONLINE: