From caf19d38607108304cd8cc67ed21378017f69e8a Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Thu, 22 Jul 2010 09:36:51 +0900 Subject: [PATCH] [SCSI] sg: fix bio leak with a detached device After blk_rq_map_user is successful, if we find that a device is unavailable (was detached), we must call blk_end_request_all to free bio(s) before blk_rq_unmap_user and blk_put_request. Reported-by: "Dailey, Nate" Signed-off-by: FUJITA Tomonori Tested-by: "Dailey, Nate" Signed-off-by: James Bottomley --- Reading git-format-patch failed