summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2014-11-16 20:21:47 +0100
committerMike Snitzer <snitzer@redhat.com>2014-11-19 17:24:56 +0100
commit4d341d8216336174d35cd2575b6b9e4267a88ac8 (patch)
tree0792adf981d87cd1443e62b3aadeb99bd8b5feca /drivers/md
parentdm thin: remove stale 'trim' message in block comment above pool_message (diff)
downloadlinux-4d341d8216336174d35cd2575b6b9e4267a88ac8.tar.xz
linux-4d341d8216336174d35cd2575b6b9e4267a88ac8.zip
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: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 866ff19aa438..f8cdd97c28a7 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -525,14 +525,15 @@ 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);
+ r = tgt->type->ioctl(tgt, cmd, arg);
out:
dm_put_live_table(md, srcu_idx);