public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Abhishek Sahu <absahu@codeaurora.org>
Cc: dwmw2@infradead.org, computersforpeace@gmail.com,
	marek.vasut@gmail.com, richard@nod.at,
	cyrille.pitchen@wedev4u.fr, linux-arm-msm@vger.kernel.org,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: blkdevs: Fix mtd block write failure
Date: Thu, 3 Aug 2017 17:10:04 +0200	[thread overview]
Message-ID: <20170803171004.3fbab4a7@bbrezillon> (raw)
In-Reply-To: <1501677185-1308-1-git-send-email-absahu@codeaurora.org>

On Wed,  2 Aug 2017 18:03:05 +0530
Abhishek Sahu <absahu@codeaurora.org> wrote:

> All the MTD block write requests are failing with
> following error messages
> 
>     mkfs.ext4  /dev/mtdblock0
> 
>     print_req_error: I/O error, dev mtdblock0, sector 0
>     Buffer I/O error on dev mtdblock0, logical block 0,
>     lost async page write
> 
> The control is going to default case after block write request
> because of missing return.
> 
> Fixes: commit 2a842acab109 ("block: introduce new block status code type")
> Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
>  drivers/mtd/mtd_blkdevs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
> index f336a9b..9ec8f03 100644
> --- a/drivers/mtd/mtd_blkdevs.c
> +++ b/drivers/mtd/mtd_blkdevs.c
> @@ -113,6 +113,7 @@ static blk_status_t do_blktrans_request(struct mtd_blktrans_ops *tr,
>  		for (; nsect > 0; nsect--, block++, buf += tr->blksize)
>  			if (tr->writesect(dev, block, buf))
>  				return BLK_STS_IOERR;
> +		return BLK_STS_OK;
>  	default:
>  		return BLK_STS_IOERR;
>  	}

  reply	other threads:[~2017-08-03 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 12:33 [PATCH] mtd: blkdevs: Fix mtd block write failure Abhishek Sahu
2017-08-03 15:10 ` Boris Brezillon [this message]
2017-08-04 20:14   ` Abhishek Sahu
2017-08-12 21:54     ` Brian Norris

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=20170803171004.3fbab4a7@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=absahu@codeaurora.org \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    /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