From: Roberto Nibali <rnibali@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] block: do not BUG() on failed block_get
Date: Thu, 31 May 2012 14:46:24 +0200 [thread overview]
Message-ID: <CAONxwYMAQQ+XJujoBpFeDB-v2AtUptH7inrE6ddyHckuoW1nuw@mail.gmail.com> (raw)
In-Reply-To: <1338355875-18830-2-git-send-email-s.hauer@pengutronix.de>
[-- Attachment #1.1: Type: text/plain, Size: 863 bytes --]
Hi
On Wed, May 30, 2012 at 7:31 AM, Sascha Hauer <s.hauer@pengutronix.de>wrote:
> It does not necessarily means a bug when block_get fails here,
> this can also be a failure on the underlying device.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> common/block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/block.c b/common/block.c
> index 437dc95..5983171 100644
> --- a/common/block.c
> +++ b/common/block.c
> @@ -245,7 +245,7 @@ static int block_put(struct block_device *blk, const
> void *buf, int block)
>
> data = block_get(blk, block);
> if (IS_ERR(data))
> - BUG();
> + return PTR_ERR(data);
>
> memcpy(data, buf, 1 << blk->blockbits);
>
> --
> 1.7.10
>
>
Tested-by: Roberto Nibali <rnibali@gmail.com>
Acked-by: Roberto Nibali <rnibali@gmail.com>
[-- Attachment #1.2: Type: text/html, Size: 1464 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-05-31 12:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 5:31 [PATCH 1/2] block: propagate error code from block_get Sascha Hauer
2012-05-30 5:31 ` [PATCH 2/2] block: do not BUG() on failed block_get Sascha Hauer
2012-05-31 12:46 ` Roberto Nibali [this message]
2012-05-31 12:45 ` [PATCH 1/2] block: propagate error code from block_get Roberto Nibali
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=CAONxwYMAQQ+XJujoBpFeDB-v2AtUptH7inrE6ddyHckuoW1nuw@mail.gmail.com \
--to=rnibali@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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