From: NeilBrown <neilb@suse.de>
To: Jianpeng Ma <majianpeng@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [PATCH] md/bitmap:Don't use IS_ERR to judge alloc_page().
Date: Thu, 20 Sep 2012 12:54:40 +1000 [thread overview]
Message-ID: <20120920125440.7f0fdea9@notabene.brown> (raw)
In-Reply-To: <2012091510425793786613@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
On Sat, 15 Sep 2012 10:43:00 +0800 "Jianpeng Ma" <majianpeng@gmail.com> wrote:
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
> drivers/md/bitmap.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index 94e7f6b..f03ad11 100644
> --- a/drivers/md/bitmap.c
> +++ b/drivers/md/bitmap.c
> @@ -476,11 +476,8 @@ static int bitmap_new_disk_sb(struct bitmap *bitmap)
> int err = -EINVAL;
>
> bitmap->storage.sb_page = alloc_page(GFP_KERNEL);
> - if (IS_ERR(bitmap->storage.sb_page)) {
> - err = PTR_ERR(bitmap->storage.sb_page);
> - bitmap->storage.sb_page = NULL;
> - return err;
> - }
> + if (bitmap->storage.sb_page == NULL)
> + return -ENOMEM;
> bitmap->storage.sb_page->index = 0;
>
> sb = kmap_atomic(bitmap->storage.sb_page);
Applied,
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2012-09-20 2:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-15 2:43 [PATCH] md/bitmap:Don't use IS_ERR to judge alloc_page() Jianpeng Ma
2012-09-20 2:54 ` 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=20120920125440.7f0fdea9@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=majianpeng@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).