]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix error handling in sg_io
authorSabrina Dubroca <sd@queasysnail.net>
Tue, 26 Aug 2014 14:14:02 +0000 (16:14 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 26 Aug 2014 14:20:01 +0000 (08:20 -0600)
commit08fa557b49374c04d8f2f73ecf4e1c2dd8ce8cbf
treee3056acc30ff3e7d928c9d074fd7d22263bc9e66
parent8958a779bc89405a7acda54ac0a146932e815003
block: fix error handling in sg_io

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

Since f30a66f89784, 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@queasysnail.net>
Fixes: f30a66f89784 ("block: cleanup error handling in sg_io")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/scsi_ioctl.c