Commit 181bdc17 authored by Neil Brown's avatar Neil Brown Committed by David S. Miller

[PATCH] md - 1 of 3 - Remove BUG in md.c that change in 2.5.33 triggers.

Since 2.5.33, the blk_dev[].queue is called without
the device open, so md_queue_proc can no-longer assume
that the device is open.
parent da4c77fc
...@@ -3149,11 +3149,11 @@ request_queue_t * md_queue_proc(kdev_t dev) ...@@ -3149,11 +3149,11 @@ request_queue_t * md_queue_proc(kdev_t dev)
{ {
mddev_t *mddev = mddev_find(minor(dev)); mddev_t *mddev = mddev_find(minor(dev));
request_queue_t *q = BLK_DEFAULT_QUEUE(MAJOR_NR); request_queue_t *q = BLK_DEFAULT_QUEUE(MAJOR_NR);
if (!mddev || atomic_read(&mddev->active)<2) if (mddev) {
BUG(); if (mddev->pers)
if (mddev->pers) q = &mddev->queue;
q = &mddev->queue; mddev_put(mddev);
mddev_put(mddev); /* the caller must hold a reference... */ }
return q; return q;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment