diff options
author | Christian Brauner <brauner@kernel.org> | 2023-11-30 13:49:08 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-12-12 14:24:13 +0100 |
commit | 24fa3ae9467f49dd9698fd884f2c6b13cc8ea12d (patch) | |
tree | d79adef9a062c6e43d7c21dd51d0418fedd6e7bc /io_uring/openclose.c | |
parent | a88c955fcfb49727d0ed86b47410f6555a8e69e4 (diff) | |
download | linux-stable-24fa3ae9467f49dd9698fd884f2c6b13cc8ea12d.tar.gz linux-stable-24fa3ae9467f49dd9698fd884f2c6b13cc8ea12d.tar.bz2 linux-stable-24fa3ae9467f49dd9698fd884f2c6b13cc8ea12d.zip |
file: remove pointless wrapper
Only io_uring uses __close_fd_get_file(). All it does is hide
current->files but io_uring accesses files_struct directly right now
anyway so it's a bit pointless. Just rename pick_file() to
file_close_fd_locked() and let io_uring use it. Add a lockdep assert in
there that we expect the caller to hold file_lock while we're at it.
Link: https://lore.kernel.org/r/20231130-vfs-files-fixes-v1-2-e73ca6f4ea83@kernel.org
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'io_uring/openclose.c')
-rw-r--r-- | io_uring/openclose.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/openclose.c b/io_uring/openclose.c index fb73adb89067..74fc22461f48 100644 --- a/io_uring/openclose.c +++ b/io_uring/openclose.c @@ -241,7 +241,7 @@ int io_close(struct io_kiocb *req, unsigned int issue_flags) return -EAGAIN; } - file = __close_fd_get_file(close->fd); + file = file_close_fd_locked(files, close->fd); spin_unlock(&files->file_lock); if (!file) goto err; |