From: Jens Axboe <jens.axboe@oracle.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Nikanth Karthikesan <knikanth@novell.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] io context: fix ref counting
Date: Fri, 31 Jul 2009 08:54:36 +0200 [thread overview]
Message-ID: <20090731065436.GM12579@kernel.dk> (raw)
In-Reply-To: <4A7280F8.1070401@cn.fujitsu.com>
On Fri, Jul 31 2009, Li Zefan wrote:
> Commit d9c7d394a8ebacb60097b192939ae9f15235225e
> ("block: prevent possible io_context->refcount overflow") mistakenly
> changed atomic_inc(&ioc->nr_tasks) to atomic_long_inc(&ioc->refcount).
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
> include/linux/iocontext.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
> index dd05434..4da4a75 100644
> --- a/include/linux/iocontext.h
> +++ b/include/linux/iocontext.h
> @@ -92,7 +92,7 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc)
> * a race).
> */
> if (ioc && atomic_long_inc_not_zero(&ioc->refcount)) {
> - atomic_long_inc(&ioc->refcount);
> + atomic_inc(&ioc->nr_tasks);
> return ioc;
> }
Irk, good catch. Applied to immediate upstream branch.
--
Jens Axboe
prev parent reply other threads:[~2009-07-31 6:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 5:28 [PATCH] io context: fix ref counting Li Zefan
2009-07-31 5:38 ` Nikanth Karthikesan
2009-07-31 6:54 ` Jens Axboe [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=20090731065436.GM12579@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=knikanth@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.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