From: Jens Axboe <axboe@kernel.dk>
To: weiping zhang <zhangweiping@didichuxing.com>,
jack@suse.cz, tj@kernel.org
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] bdi: fix cleanup when fail to percpu_counter_init
Date: Mon, 18 Sep 2017 08:04:04 -0600 [thread overview]
Message-ID: <21c323b8-7ec4-518f-5fe5-3ed724506c31@kernel.dk> (raw)
In-Reply-To: <20170915182700.GA2489@localhost.didichuxing.com>
On 09/15/2017 12:27 PM, weiping zhang wrote:
> when percpu_counter_init fail at i, 0 ~ (i-1) should be destoried, not
> 1 ~ i.
>
> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
> ---
> mm/backing-dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index e19606b..d399d3c 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -334,7 +334,7 @@ static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi,
> return 0;
>
> out_destroy_stat:
> - while (i--)
> + while (--i >= 0)
These two constructs will produce identical results.
--
Jens Axboe
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-09-18 14:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 18:27 [PATCH] bdi: fix cleanup when fail to percpu_counter_init weiping zhang
2017-09-18 8:35 ` Jan Kara
2017-09-18 14:04 ` Jens Axboe [this message]
2017-09-19 8:13 ` Jan Kara
2017-09-19 10:31 ` weiping zhang
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=21c323b8-7ec4-518f-5fe5-3ed724506c31@kernel.dk \
--to=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
--cc=tj@kernel.org \
--cc=zhangweiping@didichuxing.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).