From: NeilBrown <neilb@suse.de>
To: Namhyung Kim <namhyung@gmail.com>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] md: convert double atomic_inc() to atomic_add()
Date: Thu, 2 Jun 2011 15:47:54 +1000 [thread overview]
Message-ID: <20110602154754.142920c6@notabene.brown> (raw)
In-Reply-To: <1306990383-14133-1-git-send-email-namhyung@gmail.com>
On Thu, 2 Jun 2011 13:53:02 +0900 Namhyung Kim <namhyung@gmail.com> wrote:
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> ---
> drivers/md/md.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index aa640a85bb21..f210e42a56ca 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -396,8 +396,7 @@ static void submit_flushes(struct work_struct *ws)
> * we reclaim rcu_read_lock
> */
> struct bio *bi;
> - atomic_inc(&rdev->nr_pending);
> - atomic_inc(&rdev->nr_pending);
> + atomic_add(2, &rdev->nr_pending);
> rcu_read_unlock();
> bi = bio_alloc_mddev(GFP_KERNEL, 0, mddev);
> bi->bi_end_io = md_end_flush;
Thanks, but I don't think I want this patch.
I'm happy having two separate 'atomic_inc' calls. I think it makes it a bit
clearer what is happening, and it is easier to search for all atomic_inc
calls.
NeilBrown
prev parent reply other threads:[~2011-06-02 5:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 4:53 [PATCH 1/2] md: convert double atomic_inc() to atomic_add() Namhyung Kim
2011-06-02 4:53 ` [PATCH 2/2] md: check ->hot_remove_disk when removing disk Namhyung Kim
2011-06-02 5:53 ` NeilBrown
2011-06-02 5:47 ` NeilBrown [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=20110602154754.142920c6@notabene.brown \
--to=neilb@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=namhyung@gmail.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;
as well as URLs for NNTP newsgroup(s).