From: Pete Zaitcev Date: Wed, 9 Apr 2008 00:41:51 +0000 (-0700) Subject: ub: remove BUG() after __blk_end_request and fix the condition causing it X-Git-Tag: v2.6.25-rc9~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef45cb624b9517f71ad6c61299478c2cc08e4d98;p=pandora-kernel.git ub: remove BUG() after __blk_end_request and fix the condition causing it When __blk_end_request returns nonzero, it means that the request was not completely processed and some BIOs are still attached. Since we have dequeued it by that time, it means leaking requests and hanging processes, which is why BUG() was in there. In ub this happens if a packet request ends normally, but with residue (e.g. when scsi_id issues INQUIRY). The fix is to make sure that arguments passed to __blk_end_request are correct: the full request length and not just transferred length. The transferred length is indicated to applications by adjusting rq->data_len with old, unchanged code outside of this patch. Signed-off-by: Pete Zaitcev Cc: Kiyoshi Ueda Cc: Greg KH Cc: Boaz Harrosh Cc: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed