Re: [PATCH -next] io_uring: Remove redundant NULL check

From: Jens Axboe
Date: Wed Jul 22 2020 - 23:25:13 EST


On 7/22/20 9:19 PM, Li Heng wrote:
> Fix below warnings reported by coccicheck:
> ./fs/io_uring.c:1544:2-7: WARNING: NULL check before some freeing functions is not needed.
> ./fs/io_uring.c:3095:2-7: WARNING: NULL check before some freeing functions is not needed.
> ./fs/io_uring.c:3195:2-7: WARNING: NULL check before some freeing functions is not needed.

Not needed, but it's faster that way. See recent discussions on the
io-uring list. Hence they are very much on purpose, and it'd be great if
someone would ensure that kfree() was an inline that checks for non-NULL
before calling __kfree() or whatever the real function would then be.

--
Jens Axboe