]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
dm: trigger change uevent on rename
authorAlasdair G Kergon <agk@redhat.com>
Thu, 13 Dec 2007 14:15:57 +0000 (14:15 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 20 Dec 2007 17:32:11 +0000 (17:32 +0000)
Insert a missing KOBJ_CHANGE notification when a device is renamed.

Cc: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-ioctl.c
drivers/md/dm.c
drivers/md/dm.h

index be730fdd48304b67b19c0c8c742fcd472fef7761..9627fa0f9470cfdb4055199e83eb68c7f8a5f18f 100644 (file)
@@ -332,6 +332,8 @@ static int dm_hash_rename(const char *old, const char *new)
                dm_table_put(table);
        }
 
+       dm_kobject_uevent(hc->md);
+
        dm_put(hc->md);
        up_write(&_hash_lock);
        kfree(old_name);
index cff2a714c107a33c09eb22369d2394fc14683a9c..88c0fd657825fb88aab0eb07611050b2546c3514 100644 (file)
@@ -1514,7 +1514,7 @@ int dm_resume(struct mapped_device *md)
 
        dm_table_unplug_all(map);
 
-       kobject_uevent(&md->disk->kobj, KOBJ_CHANGE);
+       dm_kobject_uevent(md);
 
        r = 0;
 
@@ -1528,6 +1528,11 @@ out:
 /*-----------------------------------------------------------------
  * Event notification.
  *---------------------------------------------------------------*/
+void dm_kobject_uevent(struct mapped_device *md)
+{
+       kobject_uevent(&md->disk->kobj, KOBJ_CHANGE);
+}
+
 uint32_t dm_next_uevent_seq(struct mapped_device *md)
 {
        return atomic_add_return(1, &md->uevent_seq);
index 177297a88ebda3004dcfe17d3c0b0e1495270416..b4584a39383bdeda58fc1f16f596447648f1e110 100644 (file)
@@ -187,4 +187,6 @@ union map_info *dm_get_mapinfo(struct bio *bio);
 int dm_open_count(struct mapped_device *md);
 int dm_lock_for_deletion(struct mapped_device *md);
 
+void dm_kobject_uevent(struct mapped_device *md);
+
 #endif