]> www.infradead.org Git - users/hch/misc.git/commit
io_uring/napi: improve __io_napi_add
authorOlivier Langlois <olivier@trillion01.com>
Sun, 13 Oct 2024 18:28:50 +0000 (14:28 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Nov 2024 20:55:38 +0000 (13:55 -0700)
commita5e26f49fef9485bc4ae24666d984a6de11e058c
tree878bfe97fd47d93ef7e38066791cb63434b65c4d
parent45b3941d09d13b3503309be1f023b83deaf69b4d
io_uring/napi: improve __io_napi_add

1. move the sock->sk pointer validity test outside the function to
   avoid the function call overhead and to make the function more
   more reusable
2. change its name to __io_napi_add_id to be more precise about it is
   doing
3. return an error code to report errors

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Link: https://lore.kernel.org/r/d637fa3b437d753c0f4e44ff6a7b5bf2c2611270.1728828877.git.olivier@trillion01.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/napi.c
io_uring/napi.h