linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: fix wrong uevent target
@ 2014-07-02  9:03 Miao Xie
  2014-07-03 11:09 ` Miao Xie
  0 siblings, 1 reply; 6+ messages in thread
From: Miao Xie @ 2014-07-02  9:03 UTC (permalink / raw)
  To: linux-btrfs

block_device's bd_disk points to the disk, not the object which block_device
is actually corresponding to(the whole disk or a partition), so we would send
uevent to the wrong target. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
 fs/btrfs/volumes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 95828b0..e8b9214 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -123,7 +123,7 @@ static void btrfs_kobject_uevent(struct block_device *bdev,
 {
 	int ret;
 
-	ret = kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, action);
+	ret = kobject_uevent(&part_to_dev(bdev->bd_part)->kobj, action);
 	if (ret)
 		pr_warn("BTRFS: Sending event '%d' to kobject: '%s' (%p): failed\n",
 			action,
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-04  4:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-02  9:03 [PATCH] Btrfs: fix wrong uevent target Miao Xie
2014-07-03 11:09 ` Miao Xie
2014-07-03 14:00   ` Chris Mason
2014-07-03 17:32     ` Anand Jain
2014-07-04  1:58       ` Qu Wenruo
2014-07-04  4:18       ` Miao Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).