Re: [PATCH] block: fix error handling in sg_io

From: Christoph Hellwig
Date: Tue Aug 26 2014 - 10:18:34 EST


On Tue, Aug 26, 2014 at 04:14:02PM +0200, Sabrina Dubroca wrote:
> Before commit 2cada584b200 ("block: cleanup error handling in sg_io"),
> we had ret = 0 before entering the last big if block of sg_io.
>
> Since 2cada584b200, ret = -EFAULT, which breaks hdparm:
>
> /dev/sda:
> setting Advanced Power Management level to 0xc8 (200)
> HDIO_DRIVE_CMD failed: Bad address
> APM_level = 128
>
> Signed-off-by: Sabrina Dubroca <sd@xxxxxxxxxxxxxxx>
> Fixes: 2cada584b200 ("block: cleanup error handling in sg_io")

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/