dm: trigger change uevent on rename

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>

+10 -1
+2
drivers/md/dm-ioctl.c
··· 332 332 dm_table_put(table); 333 333 } 334 334 335 + dm_kobject_uevent(hc->md); 336 + 335 337 dm_put(hc->md); 336 338 up_write(&_hash_lock); 337 339 kfree(old_name);
+6 -1
drivers/md/dm.c
··· 1514 1514 1515 1515 dm_table_unplug_all(map); 1516 1516 1517 - kobject_uevent(&md->disk->kobj, KOBJ_CHANGE); 1517 + dm_kobject_uevent(md); 1518 1518 1519 1519 r = 0; 1520 1520 ··· 1528 1528 /*----------------------------------------------------------------- 1529 1529 * Event notification. 1530 1530 *---------------------------------------------------------------*/ 1531 + void dm_kobject_uevent(struct mapped_device *md) 1532 + { 1533 + kobject_uevent(&md->disk->kobj, KOBJ_CHANGE); 1534 + } 1535 + 1531 1536 uint32_t dm_next_uevent_seq(struct mapped_device *md) 1532 1537 { 1533 1538 return atomic_add_return(1, &md->uevent_seq);
+2
drivers/md/dm.h
··· 187 187 int dm_open_count(struct mapped_device *md); 188 188 int dm_lock_for_deletion(struct mapped_device *md); 189 189 190 + void dm_kobject_uevent(struct mapped_device *md); 191 + 190 192 #endif