aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2007-12-13 09:15:57 -0500
committerAlasdair G Kergon <agk@redhat.com>2007-12-20 12:32:11 -0500
commit69267a30bed1fabec658058c63845528a8b813d4 (patch)
treed6c527bc0d456089f1eaf0998fe39ef899b8c1fc /drivers/md/dm.c
parentadfe47702c4726b3e045f9f83178def02833be4c (diff)
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>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index cff2a714c107..88c0fd657825 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1514,7 +1514,7 @@ int dm_resume(struct mapped_device *md)
1514 1514
1515 dm_table_unplug_all(map); 1515 dm_table_unplug_all(map);
1516 1516
1517 kobject_uevent(&md->disk->kobj, KOBJ_CHANGE); 1517 dm_kobject_uevent(md);
1518 1518
1519 r = 0; 1519 r = 0;
1520 1520
@@ -1528,6 +1528,11 @@ out:
1528/*----------------------------------------------------------------- 1528/*-----------------------------------------------------------------
1529 * Event notification. 1529 * Event notification.
1530 *---------------------------------------------------------------*/ 1530 *---------------------------------------------------------------*/
1531void dm_kobject_uevent(struct mapped_device *md)
1532{
1533 kobject_uevent(&md->disk->kobj, KOBJ_CHANGE);
1534}
1535
1531uint32_t dm_next_uevent_seq(struct mapped_device *md) 1536uint32_t dm_next_uevent_seq(struct mapped_device *md)
1532{ 1537{
1533 return atomic_add_return(1, &md->uevent_seq); 1538 return atomic_add_return(1, &md->uevent_seq);