From: Miao Xie <miaox@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: Anand Jain <Anand.Jain@oracle.com>
Subject: Re: [PATCH] Btrfs: fix wrong uevent target
Date: Thu, 3 Jul 2014 19:09:02 +0800 [thread overview]
Message-ID: <53B539CE.7070201@cn.fujitsu.com> (raw)
In-Reply-To: <1404291834-11113-1-git-send-email-miaox@cn.fujitsu.com>
CC Anand Jain
Sorry, please ignore this patch.
Anand wrote the same patch several days ago, so this bug fix belongs to Anand
though he NACKed his patch at that time.
Thanks
Miao
On Wed, 2 Jul 2014 17:03:54 +0800, Miao Xie wrote:
> 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,
>
next prev parent reply other threads:[~2014-07-03 11:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 9:03 [PATCH] Btrfs: fix wrong uevent target Miao Xie
2014-07-03 11:09 ` Miao Xie [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53B539CE.7070201@cn.fujitsu.com \
--to=miaox@cn.fujitsu.com \
--cc=Anand.Jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).