From: Jens Axboe Date: Fri, 7 Jul 2023 17:11:58 +0000 (-0600) Subject: io_uring/splice: use fput() directly X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9f69a259576ad46e6a13812b2c272bc9a89f8e03;p=linux.git io_uring/splice: use fput() directly No point in using io_file_put() here, as we need to check if it's a fixed file in the caller anyway. Signed-off-by: Jens Axboe --- diff --git a/io_uring/splice.c b/io_uring/splice.c index 2a4bbb7195311..7c4469e9540e0 100644 --- a/io_uring/splice.c +++ b/io_uring/splice.c @@ -68,7 +68,7 @@ int io_tee(struct io_kiocb *req, unsigned int issue_flags) ret = do_tee(in, out, sp->len, flags); if (!(sp->flags & SPLICE_F_FD_IN_FIXED)) - io_put_file(in); + fput(in); done: if (ret != sp->len) req_set_fail(req); @@ -112,7 +112,7 @@ int io_splice(struct io_kiocb *req, unsigned int issue_flags) ret = do_splice(in, poff_in, out, poff_out, sp->len, flags); if (!(sp->flags & SPLICE_F_FD_IN_FIXED)) - io_put_file(in); + fput(in); done: if (ret != sp->len) req_set_fail(req);