summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-02-22 10:24:52 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-22 10:24:52 -0800
commitc45ec6566021ba3162233b575e7bc76d57b86688 (patch)
treebd994acbbadc78fce745fac3de44ee5cf5ff5a1a /fs
parent102d60a2d8a6b54a20317a855dca3b598a2fd581 (diff)
parentfa675765afed59bb89adba3369094ebd428b930b (diff)
downloadop-kernel-dev-c45ec6566021ba3162233b575e7bc76d57b86688.zip
op-kernel-dev-c45ec6566021ba3162233b575e7bc76d57b86688.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Diffstat (limited to 'fs')
-rw-r--r--fs/super.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c
index 3029421..e20b558 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -666,6 +666,16 @@ static int test_bdev_super(struct super_block *s, void *data)
return (void *)s->s_bdev == data;
}
+static void bdev_uevent(struct block_device *bdev, enum kobject_action action)
+{
+ if (bdev->bd_disk) {
+ if (bdev->bd_part)
+ kobject_uevent(&bdev->bd_part->kobj, action);
+ else
+ kobject_uevent(&bdev->bd_disk->kobj, action);
+ }
+}
+
struct super_block *get_sb_bdev(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data,
int (*fill_super)(struct super_block *, void *, int))
@@ -707,8 +717,10 @@ struct super_block *get_sb_bdev(struct file_system_type *fs_type,
up_write(&s->s_umount);
deactivate_super(s);
s = ERR_PTR(error);
- } else
+ } else {
s->s_flags |= MS_ACTIVE;
+ bdev_uevent(bdev, KOBJ_MOUNT);
+ }
}
return s;
@@ -724,6 +736,7 @@ void kill_block_super(struct super_block *sb)
{
struct block_device *bdev = sb->s_bdev;
+ bdev_uevent(bdev, KOBJ_UMOUNT);
generic_shutdown_super(sb);
sync_blockdev(bdev);
close_bdev_excl(bdev);
OpenPOWER on IntegriCloud