Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d341d82 authored by Mike Snitzer's avatar Mike Snitzer
Browse files

dm: return earlier from dm_blk_ioctl if target doesn't implement .ioctl



No point checking if the device is suspended if the current target
doesn't even implement .ioctl

Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 5ec02084
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -525,13 +525,14 @@ retry:
		goto out;

	tgt = dm_table_get_target(map, 0);
	if (!tgt->type->ioctl)
		goto out;

	if (dm_suspended_md(md)) {
		r = -EAGAIN;
		goto out;
	}

	if (tgt->type->ioctl)
	r = tgt->type->ioctl(tgt, cmd, arg);

out: