From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 5/5] io_uring: rename io_sqe_file_register
Date: Thu, 7 Apr 2022 13:40:05 +0100 [thread overview]
Message-ID: <d5091518883786969e244d2f0854a47bbdaa5061.1649334991.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Rename io_sqe_file_register(), so the name better reflects what the
function is doing.
Signed-off-by: Pavel Begunkov <[email protected]>
---
fs/io_uring.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 2545d0e9e239..714a3797c678 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -8596,7 +8596,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
* 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)
struct sock *sk = ctx->ring_sock->sk;
@@ -8829,7 +8829,7 @@ static int io_sqe_files_register(struct io_ring_ctx *ctx, void __user *arg,
fput(file);
goto fail;
}
- ret = io_sqe_file_register(ctx, file);
+ ret = io_scm_file_account(ctx, file);
if (ret) {
fput(file);
goto fail;
@@ -8897,7 +8897,7 @@ static int io_install_fixed_file(struct io_kiocb *req, struct file *file,
needs_switch = true;
}
- ret = io_sqe_file_register(ctx, file);
+ ret = io_scm_file_account(ctx, file);
if (!ret) {
*io_get_tag_slot(ctx->file_data, slot_index) = 0;
io_fixed_file_set(file_slot, file);
@@ -9013,7 +9013,7 @@ static int __io_sqe_files_update(struct io_ring_ctx *ctx,
err = -EBADF;
break;
}
- err = io_sqe_file_register(ctx, file);
+ err = io_scm_file_account(ctx, file);
if (err) {
fput(file);
break;
--
2.35.1
next prev parent reply other threads:[~2022-04-07 12:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 12:40 [PATCH next 0/5] simplify SCM accounting Pavel Begunkov
2022-04-07 12:40 ` [PATCH 1/5] io_uring: uniform " Pavel Begunkov
2022-04-07 12:40 ` [PATCH 2/5] io_uring: refactor __io_sqe_files_scm Pavel Begunkov
2022-04-07 12:40 ` [PATCH 3/5] io_uring: don't pass around fixed index for scm Pavel Begunkov
2022-04-07 12:40 ` [PATCH 4/5] io_uring: deduplicate SCM accounting Pavel Begunkov
2022-04-07 12:40 ` Pavel Begunkov [this message]
2022-04-07 17:54 ` [PATCH next 0/5] simplify " Jens Axboe
2022-04-07 17:55 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5091518883786969e244d2f0854a47bbdaa5061.1649334991.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox