Fix dm_swap_table __bind error case - missing unlock! [submitted to -mm but without dm_suspended change] --- diff/drivers/md/dm.c 2005-07-06 19:02:19.000000000 +0100 +++ source/drivers/md/dm.c 2005-07-06 19:02:16.000000000 +0100 @@ -962,23 +962,20 @@ */ int dm_swap_table(struct mapped_device *md, struct dm_table *table) { - int r; + int r = -EINVAL; down_write(&md->lock); /* device must be suspended */ - if (!dm_suspended(md)) { - up_write(&md->lock); - return -EPERM; - } + if (!dm_suspended(md)) + goto out; __unbind(md); r = __bind(md, table); - if (r) - return r; +out: up_write(&md->lock); - return 0; + return r; } /*