Hello!
This patch is required otherwise in case if elv_try_last_merge returns nonzero, we do not
initialise *req, and subsequent BUG_ON() in __make_request() will dies because req is NULL
(or is just uninitialised).
This stopped my UBD devices to work, that's how I noticed ;)
Bye,
Oleg
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1228 -> 1.1229
# drivers/block/noop-iosched.c 1.2 -> 1.3
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/08 [email protected] 1.1229
# Fix request merging in noop elevator, preventing a crash in __make_request()
# --------------------------------------------
#
diff -Nru a/drivers/block/noop-iosched.c b/drivers/block/noop-iosched.c
--- a/drivers/block/noop-iosched.c Mon Sep 8 19:25:35 2003
+++ b/drivers/block/noop-iosched.c Mon Sep 8 19:25:35 2003
@@ -24,8 +24,10 @@
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);
On Mon, Sep 08 2003, Oleg Drokin wrote:
> Hello!
>
> This patch is required otherwise in case if elv_try_last_merge
> returns nonzero, we do not initialise *req, and subsequent BUG_ON()
> in __make_request() will dies because req is NULL (or is just
> uninitialised). This stopped my UBD devices to work, that's how I
> noticed ;)
Thanks, patch looks good.
--
Jens Axboe