summaryrefslogtreecommitdiffstats
path: root/block-stray-block-put-after-teardown.patch
blob: f4bf9c40c7092c19954bed9f535b15c12b394656 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- linux-2.6.39.noarch/block/elevator.c~	2011-08-09 10:07:41.532774872 -0400
+++ linux-2.6.39.noarch/block/elevator.c	2011-08-09 10:07:56.131724173 -0400
@@ -815,7 +815,7 @@ void elv_completed_request(struct reques
 	 */
 	if (blk_account_rq(rq)) {
 		q->in_flight[rq_is_sync(rq)]--;
-		if ((rq->cmd_flags & REQ_SORTED) &&
+		if ((rq->cmd_flags & REQ_SORTED) && e->ops &&
 		    e->ops->elevator_completed_req_fn)
 			e->ops->elevator_completed_req_fn(q, rq);
 	}