bc12142
--- linux-2.6.39.noarch/block/elevator.c~	2011-08-09 10:07:41.532774872 -0400
bc12142
+++ linux-2.6.39.noarch/block/elevator.c	2011-08-09 10:07:56.131724173 -0400
bc12142
@@ -815,7 +815,7 @@ void elv_completed_request(struct reques
bc12142
 	 */
bc12142
 	if (blk_account_rq(rq)) {
bc12142
 		q->in_flight[rq_is_sync(rq)]--;
bc12142
-		if ((rq->cmd_flags & REQ_SORTED) &&
bc12142
+		if ((rq->cmd_flags & REQ_SORTED) && e->ops &&
bc12142
 		    e->ops->elevator_completed_req_fn)
bc12142
 			e->ops->elevator_completed_req_fn(q, rq);
bc12142
 	}