Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360320
b: refs/heads/master
c: 87eb5b2
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and Alasdair G Kergon committed Mar 1, 2013
1 parent 0e13771 commit 2b14f72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23cb21092eb9dcec9d3604b68d95192b79915890
refs/heads/master: 87eb5b21d92a92ac2da3163039d62df88c2b8422
12 changes: 7 additions & 5 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,7 @@ static void dm_queue_flush(struct mapped_device *md)
*/
struct dm_table *dm_swap_table(struct mapped_device *md, struct dm_table *table)
{
struct dm_table *live_map, *map = ERR_PTR(-EINVAL);
struct dm_table *live_map = NULL, *map = ERR_PTR(-EINVAL);
struct queue_limits limits;
int r;

Expand All @@ -2469,10 +2469,12 @@ struct dm_table *dm_swap_table(struct mapped_device *md, struct dm_table *table)
dm_table_put(live_map);
}

r = dm_calculate_queue_limits(table, &limits);
if (r) {
map = ERR_PTR(r);
goto out;
if (!live_map) {
r = dm_calculate_queue_limits(table, &limits);
if (r) {
map = ERR_PTR(r);
goto out;
}
}

map = __bind(md, table, &limits);
Expand Down

0 comments on commit 2b14f72

Please sign in to comment.