diff options
-rw-r--r-- | drivers/block/ublk_drv.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index d8985d49a05b..9ea7cd698d20 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -2228,14 +2228,11 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd, goto out; /* there is pending io cmd, something must be wrong */ - if (io->flags & UBLK_IO_FLAG_ACTIVE) { + if (!(io->flags & UBLK_IO_FLAG_OWNED_BY_SRV)) { ret = -EBUSY; goto out; } - if (!(io->flags & UBLK_IO_FLAG_OWNED_BY_SRV)) - goto out; - /* * ensure that the user issues UBLK_IO_NEED_GET_DATA * iff the driver have set the UBLK_IO_FLAG_NEED_GET_DATA. |