diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2006-02-24 04:06:36 -0500 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2006-02-24 04:06:36 -0500 |
| commit | fab8d6ddf6dee2608869005d45fe97f70e4f5bdd (patch) | |
| tree | fecf566e03a87b2a44c7f3363ddb5c0d4bebdca7 /fs/super.c | |
| parent | 64419d93a5906600af5817ad0cae3c6ecf7fb389 (diff) | |
| parent | f52ee1410d563cd409b08822492273a5bc235821 (diff) | |
Merge branch 'master' of /home/src/linux-2.6/
Diffstat (limited to 'fs/super.c')
| -rw-r--r-- | fs/super.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/fs/super.c b/fs/super.c index c177b92419c5..e20b5580afd5 100644 --- a/fs/super.c +++ b/fs/super.c | |||
| @@ -247,8 +247,9 @@ void generic_shutdown_super(struct super_block *sb) | |||
| 247 | 247 | ||
| 248 | /* Forget any remaining inodes */ | 248 | /* Forget any remaining inodes */ |
| 249 | if (invalidate_inodes(sb)) { | 249 | if (invalidate_inodes(sb)) { |
| 250 | printk("VFS: Busy inodes after unmount. " | 250 | printk("VFS: Busy inodes after unmount of %s. " |
| 251 | "Self-destruct in 5 seconds. Have a nice day...\n"); | 251 | "Self-destruct in 5 seconds. Have a nice day...\n", |
| 252 | sb->s_id); | ||
| 252 | } | 253 | } |
| 253 | 254 | ||
| 254 | unlock_kernel(); | 255 | unlock_kernel(); |
| @@ -665,6 +666,16 @@ static int test_bdev_super(struct super_block *s, void *data) | |||
| 665 | return (void *)s->s_bdev == data; | 666 | return (void *)s->s_bdev == data; |
| 666 | } | 667 | } |
| 667 | 668 | ||
| 669 | static void bdev_uevent(struct block_device *bdev, enum kobject_action action) | ||
| 670 | { | ||
| 671 | if (bdev->bd_disk) { | ||
| 672 | if (bdev->bd_part) | ||
| 673 | kobject_uevent(&bdev->bd_part->kobj, action); | ||
| 674 | else | ||
| 675 | kobject_uevent(&bdev->bd_disk->kobj, action); | ||
| 676 | } | ||
| 677 | } | ||
| 678 | |||
| 668 | struct super_block *get_sb_bdev(struct file_system_type *fs_type, | 679 | struct super_block *get_sb_bdev(struct file_system_type *fs_type, |
| 669 | int flags, const char *dev_name, void *data, | 680 | int flags, const char *dev_name, void *data, |
| 670 | int (*fill_super)(struct super_block *, void *, int)) | 681 | int (*fill_super)(struct super_block *, void *, int)) |
| @@ -706,8 +717,10 @@ struct super_block *get_sb_bdev(struct file_system_type *fs_type, | |||
| 706 | up_write(&s->s_umount); | 717 | up_write(&s->s_umount); |
| 707 | deactivate_super(s); | 718 | deactivate_super(s); |
| 708 | s = ERR_PTR(error); | 719 | s = ERR_PTR(error); |
| 709 | } else | 720 | } else { |
| 710 | s->s_flags |= MS_ACTIVE; | 721 | s->s_flags |= MS_ACTIVE; |
| 722 | bdev_uevent(bdev, KOBJ_MOUNT); | ||
| 723 | } | ||
| 711 | } | 724 | } |
| 712 | 725 | ||
| 713 | return s; | 726 | return s; |
| @@ -723,6 +736,7 @@ void kill_block_super(struct super_block *sb) | |||
| 723 | { | 736 | { |
| 724 | struct block_device *bdev = sb->s_bdev; | 737 | struct block_device *bdev = sb->s_bdev; |
| 725 | 738 | ||
| 739 | bdev_uevent(bdev, KOBJ_UMOUNT); | ||
| 726 | generic_shutdown_super(sb); | 740 | generic_shutdown_super(sb); |
| 727 | sync_blockdev(bdev); | 741 | sync_blockdev(bdev); |
| 728 | close_bdev_excl(bdev); | 742 | close_bdev_excl(bdev); |
