Commit d324f68b authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] scsi_io_completion sense copy

For the flush generated requests, we don't have room for sense info right
now.  This might change in the future so that the sd end_io function can
make a better judgement on what to do about an error.  So check this in
scsi_io_completion(), only copy sense data to request if it has space
assigned to it.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e18e923a
......@@ -726,7 +726,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes,
req->errors = result;
if (result) {
clear_errors = 0;
if (sense_valid) {
if (sense_valid && req->sense) {
/*
* SG_IO wants current and deferred errors
*/
......
Markdown is supported
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