aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-ioctl.c2
-rw-r--r--drivers/md/dm.c7
-rw-r--r--drivers/md/dm.h2
3 files changed, 10 insertions, 1 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index be730fdd4830..9627fa0f9470 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -332,6 +332,8 @@ static int dm_hash_rename(const char *old, const char *new)
332 dm_table_put(table); 332 dm_table_put(table);
333 } 333 }
334 334
335 dm_kobject_uevent(hc->md);
336
335 dm_put(hc->md); 337 dm_put(hc->md);
336 up_write(&_hash_lock); 338 up_write(&_hash_lock);
337 kfree(old_name); 339 kfree(old_name);
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);
diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index 177297a88ebd..b4584a39383b 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -187,4 +187,6 @@ union map_info *dm_get_mapinfo(struct bio *bio);
187int dm_open_count(struct mapped_device *md); 187int dm_open_count(struct mapped_device *md);
188int dm_lock_for_deletion(struct mapped_device *md); 188int dm_lock_for_deletion(struct mapped_device *md);
189 189
190void dm_kobject_uevent(struct mapped_device *md);
191
190#endif 192#endif