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

[PATCH] Fix noop elevator request merging

From: Oleg Drokin <green@namesys.com>

Without this, if elv_try_last_merge() returns nonzero, we do not
initialise *req.  That results in a subsequent BUG_ON() in
__make_request() because req is NULL (or is just uninitialised).
parent 4a4bb3d1
......@@ -24,8 +24,10 @@ int elevator_noop_merge(request_queue_t *q, struct request **req,
struct request *__rq;
int ret;
if ((ret = elv_try_last_merge(q, bio)))
if ((ret = elv_try_last_merge(q, bio))) {
*req = q->last_merge;
return ret;
}
while ((entry = entry->prev) != &q->queue_head) {
__rq = list_entry_rq(entry);
......
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