diff --git a/drivers/md/dm.c b/drivers/md/dm.c index ab0e2338e47e..1005abf76860 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -3003,6 +3003,11 @@ static int dm_call_pr(struct block_device *bdev, iterate_devices_callout_fn fn, goto out; ti = dm_table_get_target(table, 0); + if (dm_suspended_md(md)) { + ret = -EAGAIN; + goto out; + } + ret = -EINVAL; if (!ti->type->iterate_devices) goto out;