io_uring/splice: use fput() directly
authorJens Axboe <axboe@kernel.dk>
Fri, 7 Jul 2023 17:11:58 +0000 (11:11 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 10 Aug 2023 16:24:25 +0000 (10:24 -0600)
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 <axboe@kernel.dk>
io_uring/splice.c

index 2a4bbb7..7c4469e 100644 (file)
@@ -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);