From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: io-uring@vger.kernel.org
Cc: Pavel Emelyanov <xemul@openvz.org>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jens Axboe <axboe@kernel.dk>,
Pavel Begunkov <asml.silence@gmail.com>,
Daniel Colascione <dancol@google.com>,
Paul Moore <paul@paul-moore.com>,
Lokesh Gidra <lokeshgidra@google.com>,
Eric Biggers <ebiggers@google.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] fs: io_uring: convert to use anon_inode_getfile_secure
Date: Wed, 19 May 2021 17:00:57 +0530 [thread overview]
Message-ID: <20210519113058.1979817-3-memxor@gmail.com> (raw)
In-Reply-To: <20210519113058.1979817-1-memxor@gmail.com>
Make io_uring use anon_inode_getfile_secure helper exposed in previous
commit. This gives each io_uring instance a distinct inode.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
---
fs/io_uring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 65a17d560a73..001fcfb63f33 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -9454,8 +9454,8 @@ static struct file *io_uring_get_file(struct io_ring_ctx *ctx)
return ERR_PTR(ret);
#endif
- file = anon_inode_getfile("[io_uring]", &io_uring_fops, ctx,
- O_RDWR | O_CLOEXEC);
+ file = anon_inode_getfile_secure("[io_uring]", &io_uring_fops, ctx,
+ O_RDWR | O_CLOEXEC, NULL);
#if defined(CONFIG_UNIX)
if (IS_ERR(file)) {
sock_release(ctx->ring_sock);
--
2.31.1
next prev parent reply other threads:[~2021-05-19 11:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 11:30 [PATCH 0/2] Create io_uring fd with ephemeral inode Kumar Kartikeya Dwivedi
2021-05-19 11:30 ` [PATCH 1/2] fs: anon_inodes: export anon_inode_getfile_secure helper Kumar Kartikeya Dwivedi
2021-05-19 15:22 ` Paul Moore
2021-05-19 23:07 ` Kumar Kartikeya Dwivedi
2021-05-20 2:29 ` Paul Moore
2021-05-19 16:04 ` Christoph Hellwig
2021-05-19 11:30 ` Kumar Kartikeya Dwivedi [this message]
2021-05-19 15:18 ` [PATCH 0/2] Create io_uring fd with ephemeral inode Paul Moore
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=20210519113058.1979817-3-memxor@gmail.com \
--to=memxor@gmail.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=dancol@google.com \
--cc=ebiggers@google.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lokeshgidra@google.com \
--cc=paul@paul-moore.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xemul@openvz.org \
/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;
as well as URLs for NNTP newsgroup(s).