Commit 8b3171bd authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: rename io_sqe_file_register

Rename io_sqe_file_register(), so the name better reflects what the
function is doing.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d5091518883786969e244d2f0854a47bbdaa5061.1649334991.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 73b25d3b
...@@ -8608,7 +8608,7 @@ static struct io_sq_data *io_get_sq_data(struct io_uring_params *p, ...@@ -8608,7 +8608,7 @@ static struct io_sq_data *io_get_sq_data(struct io_uring_params *p,
* files because otherwise they can't form a loop and so are not interesting * files because otherwise they can't form a loop and so are not interesting
* for GC. * for GC.
*/ */
static int io_sqe_file_register(struct io_ring_ctx *ctx, struct file *file) static int io_scm_file_account(struct io_ring_ctx *ctx, struct file *file)
{ {
#if defined(CONFIG_UNIX) #if defined(CONFIG_UNIX)
struct sock *sk = ctx->ring_sock->sk; struct sock *sk = ctx->ring_sock->sk;
...@@ -8841,7 +8841,7 @@ static int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg, ...@@ -8841,7 +8841,7 @@ static int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg,
fput(file); fput(file);
goto fail; goto fail;
} }
ret = io_sqe_file_register(ctx, file); ret = io_scm_file_account(ctx, file);
if (ret) { if (ret) {
fput(file); fput(file);
goto fail; goto fail;
...@@ -8911,7 +8911,7 @@ static int io_install_fixed_file(struct io_kiocb *req, struct file *file, ...@@ -8911,7 +8911,7 @@ static int io_install_fixed_file(struct io_kiocb *req, struct file *file,
needs_switch = true; needs_switch = true;
} }
ret = io_sqe_file_register(ctx, file); ret = io_scm_file_account(ctx, file);
if (!ret) { if (!ret) {
*io_get_tag_slot(ctx->file_data, slot_index) = 0; *io_get_tag_slot(ctx->file_data, slot_index) = 0;
io_fixed_file_set(file_slot, file); io_fixed_file_set(file_slot, file);
...@@ -9026,7 +9026,7 @@ static int __io_sqe_files_update(struct io_ring_ctx *ctx, ...@@ -9026,7 +9026,7 @@ static int __io_sqe_files_update(struct io_ring_ctx *ctx,
err = -EBADF; err = -EBADF;
break; break;
} }
err = io_sqe_file_register(ctx, file); err = io_scm_file_account(ctx, file);
if (err) { if (err) {
fput(file); fput(file);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment