]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/rsrc: remove null check on import
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 19 Apr 2025 17:47:06 +0000 (18:47 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 21 Apr 2025 11:10:04 +0000 (05:10 -0600)
WARN_ON_ONCE() checking imu for NULL in io_import_fixed() is in the hot
path and too protective, it's time to get rid of it.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/3782c01e311dbd474bca45aefaf79a2f2822fafb.1745083025.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c

index 5d25f3391650cab621f268f1a79a844028626014..b4c5f3ee885543bb912aeb90014ee336d99adc72 100644 (file)
@@ -1058,8 +1058,6 @@ static int io_import_fixed(int ddir, struct iov_iter *iter,
        size_t offset;
        int ret;
 
-       if (WARN_ON_ONCE(!imu))
-               return -EFAULT;
        ret = validate_fixed_range(buf_addr, len, imu);
        if (unlikely(ret))
                return ret;