Skip to content
Commit d19d7446 authored by Sabrina Dubroca's avatar Sabrina Dubroca Committed by Jens Axboe
Browse files

block: fix error handling in sg_io

Before commit 2cada584 ("block: cleanup error handling in sg_io"),
we had ret = 0 before entering the last big if block of sg_io.

Since 2cada584

, 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: default avatarSabrina Dubroca <sd@queasysnail.net>
Fixes: 2cada584

 ("block: cleanup error handling in sg_io")
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 2ba136da
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment