block: WARN in __blk_put_request() for potential bio leak
[safe/jmp/linux-2.6] / block / blk-core.c
index 7b63c9b..996ed90 100644 (file)
@@ -1062,6 +1062,9 @@ void __blk_put_request(struct request_queue *q, struct request *req)
 
        elv_completed_request(q, req);
 
+       /* this is a bio leak */
+       WARN_ON(req->bio != NULL);
+
        /*
         * Request may not have originated from ll_rw_blk. if not,
         * it didn't come out of our reserved rq pools