[PATCH 04/13] swim3: end whole request on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Omar Sandoval <osandov@xxxxxx>

When swim3_end_request() gets passed an error, it seems that the intent
is to end the whole request, but we're only ending the current segment.

Signed-off-by: Omar Sandoval <osandov@xxxxxx>
---
 drivers/block/swim3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index df7ebe016e2c..24e121ee274b 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -266,7 +266,7 @@ static bool swim3_end_request(struct floppy_state *fs, blk_status_t err, unsigne
 		  err, nr_bytes, req);
 
 	if (err)
-		nr_bytes = blk_rq_cur_bytes(req);
+		nr_bytes = blk_rq_bytes(req);
 	rc = __blk_end_request(req, err, nr_bytes);
 	if (rc)
 		return true;
-- 
2.19.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux