Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1434161 > unrolled thread

[PATCH v2 07/12] pktcdvd: Generate uevent after attribute available

Started byFam Zheng <famz@redhat.com>
First post2016-06-30 04:10 +0200
Last post2016-06-30 04:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 07/12] pktcdvd: Generate uevent after attribute available Fam Zheng <famz@redhat.com> - 2016-06-30 04:10 +0200

#1434161 — [PATCH v2 07/12] pktcdvd: Generate uevent after attribute available

FromFam Zheng <famz@redhat.com>
Date2016-06-30 04:10 +0200
Subject[PATCH v2 07/12] pktcdvd: Generate uevent after attribute available
Message-ID<rPzAt-3BV-7@gated-at.bofh.it>
It is documented that KOBJ_ADD should be generated after the object's
attributes and children are ready.  We can achieve this with the new
disk_gen_uevents interface.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 drivers/block/pktcdvd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 00928406..a4e6bb7 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2785,11 +2785,13 @@ static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev)
 	disk->events = pd->bdev->bd_disk->events;
 	disk->async_events = pd->bdev->bd_disk->async_events;
 
-	add_disk(disk, true);
+	add_disk(disk, false);
 
 	pkt_sysfs_dev_new(pd);
 	pkt_debugfs_dev_new(pd);
 
+	disk_gen_uevents(disk);
+
 	pkt_devs[idx] = pd;
 	if (pkt_dev)
 		*pkt_dev = pd->pkt_dev;
-- 
2.9.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web