mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
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>
This commit is contained in:
parent
5ec02084f6
commit
4d341d8216
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user