Merge ea827627a9 ("dm ioctl: fix nested locking in table_clear() to remove deadlock concern") into android12-5.10-lts

Steps on the way to 5.10.180

Change-Id: Ia6eb1de3ebe489c20972ef5bf8433878a886fea6
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-06-26 07:12:46 +00:00

View File

@@ -1435,11 +1435,12 @@ static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_s
hc->new_map = NULL;
}
param->flags &= ~DM_INACTIVE_PRESENT_FLAG;
__dev_status(hc->md, param);
md = hc->md;
up_write(&_hash_lock);
param->flags &= ~DM_INACTIVE_PRESENT_FLAG;
__dev_status(md, param);
if (old_map) {
dm_sync_table(md);
dm_table_destroy(old_map);