[PATCH 2/2] fs: io_uring: convert to use anon_inode_getfile_secure

From: Kumar Kartikeya Dwivedi
Date: Wed May 19 2021 - 07:37:42 EST


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@xxxxxxxxx>
---
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