public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fix noop elevator request merging (in current 2.5 bk)
@ 2003-09-08 15:29 Oleg Drokin
  2003-09-08 16:09 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Drokin @ 2003-09-08 15:29 UTC (permalink / raw)
  To: akpm, linux-kernel, jdike

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	green@angband.namesys.com	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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-08 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-08 15:29 Fix noop elevator request merging (in current 2.5 bk) Oleg Drokin
2003-09-08 16:09 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox