diff options
-rw-r--r-- | drivers/md/dm-table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 57573e8b5aa9..9f95f77687ef 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -430,13 +430,13 @@ static int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev, return 0; } + mutex_lock(&q->limits_lock); /* * BLK_FEAT_ATOMIC_WRITES is not inherited from the bottom device in * blk_stack_limits(), so do it manually. */ limits->features |= (q->limits.features & BLK_FEAT_ATOMIC_WRITES); - mutex_lock(&q->limits_lock); if (blk_stack_limits(limits, &q->limits, get_start_sect(bdev) + start) < 0) DMWARN("%s: adding target device %pg caused an alignment inconsistency: " |