From: Guoqing Jiang <gqjiang@suse.com>
To: Marion & Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Shaohua Li <shli@kernel.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed").
Date: Sun, 18 Sep 2016 05:19:42 -0400 [thread overview]
Message-ID: <57DE5C2E.6040903@suse.com> (raw)
In-Reply-To: <5e0b941c-1536-3242-eb26-a500e5bb4ff6@wanadoo.fr>
On 09/14/2016 04:39 PM, Marion & Christophe JAILLET wrote:
>
> I don't share your feeling.
> bitmap_create() can return ERR_PTR(-ENOMEM) or ERR_PTR(-EINVAL).
>
> In such cases 'if (!bitmap)' will not be helpful.
>
> Maybe it should be turned into 'if (IS_ERR_OR_NULL(bitmap))' to handle
> errors returned by bitmap_create.
> Maybe just removing the call to 'bitmap_free(bitmap)' is enough.
>
I agreed we can remove it, if so, seems we are not consistent with the
previous comment of bitmap_create.
/*
* initialize the bitmap structure
* if this returns an error, bitmap_destroy must be called to do clean up
*/
What about revert it and re-use v1 patch? see
http://www.spinics.net/lists/raid/msg51819.html.
Thanks,
Guoqing
prev parent reply other threads:[~2016-09-18 9:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 19:09 Question about commit f9a67b1182e5 ("md/bitmap: clear bitmap if bitmap_create failed") Christophe JAILLET
2016-09-13 17:24 ` Shaohua Li
2016-09-14 8:25 ` Guoqing Jiang
2016-09-14 20:39 ` Marion & Christophe JAILLET
2016-09-18 9:19 ` Guoqing Jiang [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=57DE5C2E.6040903@suse.com \
--to=gqjiang@suse.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=shli@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).