io_uring: optimise kiocb_end_write for !ISREG
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 22 Mar 2021 01:58:31 +0000 (01:58 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 22 Mar 2021 13:47:12 +0000 (07:47 -0600)
commitafcf23cda0c0448361f5e350a95e5e236fa7bdbb
tree1832cc6a1c10d4890c6777cc009166310897928e
parent05594f3dc2b56b9b2d71c9cf1a1ce73ccc2c5eb9
io_uring: optimise kiocb_end_write for !ISREG

file_end_write() is only for regular files, so the function do a couple
of dereferences to get inode and check for it. However, we already have
REQ_F_ISREG at hand, just use it and inline file_end_write().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c