diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 588e8b43efab322b9e0223619ba1d22edb50a345..23e79dadafc6e0b75256ce19359974c4cdc14652 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2985,6 +2985,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;