Commit 7b8886d3 authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Linus Torvalds

[PATCH] genhd device unregistration fix

parent 02bdc207
......@@ -74,7 +74,7 @@ void blk_unregister_region(dev_t dev, unsigned long range)
down_write(&block_subsys.rwsem);
for (s = &probes[index]; *s; s = &(*s)->next) {
struct blk_probe *p = *s;
if (p->dev == dev || p->range == range) {
if (p->dev == dev && p->range == range) {
*s = p->next;
kfree(p);
break;
......
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