From: Coly Li <colyli@suse.de>
To: Shaohua Li <shli@fb.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] md/linear: shutup lockdep warnning
Date: Wed, 22 Feb 2017 15:23:15 +0800 [thread overview]
Message-ID: <71114590-9641-4697-AE24-DE07464907FC@suse.de> (raw)
In-Reply-To: <6ceac5d5f76023fe2b76dc053041c50f81775b12.1487714093.git.shli@fb.com>
> 在 2017年2月22日,上午5:55,Shaohua Li <shli@fb.com> 写道:
>
> Commit 03a9e24(md linear: fix a race between linear_add() and
> linear_congested()) introduces the warnning.
>
> Cc: Coly Li <colyli@suse.de>
> Signed-off-by: Shaohua Li <shli@fb.com>
Acked-by: Coly Li <colyli@suse.de>
Thanks for the fix !
Coly
> ---
> drivers/md/linear.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/md/linear.c b/drivers/md/linear.c
> index 789008b..5b06b0d 100644
> --- a/drivers/md/linear.c
> +++ b/drivers/md/linear.c
> @@ -224,7 +224,8 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
> * oldconf until no one uses it anymore.
> */
> mddev_suspend(mddev);
> - oldconf = rcu_dereference(mddev->private);
> + oldconf = rcu_dereference_protected(mddev->private,
> + lockdep_is_held(&mddev->reconfig_mutex));
> mddev->raid_disks++;
> WARN_ONCE(mddev->raid_disks != newconf->raid_disks,
> "copied raid_disks doesn't match mddev->raid_disks");
> --
> 2.9.3
>
prev parent reply other threads:[~2017-02-22 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 21:55 [PATCH] md/linear: shutup lockdep warnning Shaohua Li
2017-02-22 7:23 ` Coly Li [this message]
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=71114590-9641-4697-AE24-DE07464907FC@suse.de \
--to=colyli@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=shli@fb.com \
/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