dm: keep old table until after resume succeeded
When swapping a new table into place, retain the old table until its replacement is in place. An old check for an empty table is removed because this is enforced in populate_table(). __unbind() becomes redundant when followed by __bind(). Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
@@ -295,8 +295,10 @@ void dm_table_event(struct dm_table *t);
|
||||
|
||||
/*
|
||||
* The device must be suspended before calling this method.
|
||||
* Returns the previous table, which the caller must destroy.
|
||||
*/
|
||||
int dm_swap_table(struct mapped_device *md, struct dm_table *t);
|
||||
struct dm_table *dm_swap_table(struct mapped_device *md,
|
||||
struct dm_table *t);
|
||||
|
||||
/*
|
||||
* A wrapper around vmalloc.
|
||||
|
||||
Reference in New Issue
Block a user