Commit cd76ac53 authored by Joe Thornber's avatar Joe Thornber Committed by Linus Torvalds

[PATCH] dm: ioctl interface wasn't dropping a table reference

When reloading a device the ioctl interface was forgetting to drop a
reference on the new table.
parent 451d6c90
...@@ -887,6 +887,7 @@ static int reload(struct dm_ioctl *param, struct dm_ioctl *user) ...@@ -887,6 +887,7 @@ static int reload(struct dm_ioctl *param, struct dm_ioctl *user)
dm_table_put(t); dm_table_put(t);
return r; return r;
} }
dm_table_put(t); /* md will have taken its own reference */
set_disk_ro(dm_disk(md), (param->flags & DM_READONLY_FLAG)); set_disk_ro(dm_disk(md), (param->flags & DM_READONLY_FLAG));
dm_put(md); dm_put(md);
......
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