Skip to content

Commit e120a5f

Browse files
author
Mike Snitzer
committed
dm: return early from dm_pr_call() if DM device is suspended
Otherwise PR ops may be issued while the broader DM device is being reconfigured, etc. Fixes: 9c72bad ("dm: call PR reserve/unreserve on each underlying device") Signed-off-by: Mike Snitzer <[email protected]>
1 parent 3534e5a commit e120a5f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/md/dm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,6 +3096,11 @@ static int dm_call_pr(struct block_device *bdev, iterate_devices_callout_fn fn,
30963096
goto out;
30973097
ti = dm_table_get_target(table, 0);
30983098

3099+
if (dm_suspended_md(md)) {
3100+
ret = -EAGAIN;
3101+
goto out;
3102+
}
3103+
30993104
ret = -EINVAL;
31003105
if (!ti->type->iterate_devices)
31013106
goto out;

0 commit comments

Comments
 (0)