]> git.ipfire.org Git - thirdparty/linux.git/commit
file: remove pointless wrapper
authorChristian Brauner <brauner@kernel.org>
Thu, 30 Nov 2023 12:49:08 +0000 (13:49 +0100)
committerChristian Brauner <brauner@kernel.org>
Tue, 12 Dec 2023 13:24:13 +0000 (14:24 +0100)
commit24fa3ae9467f49dd9698fd884f2c6b13cc8ea12d
treed79adef9a062c6e43d7c21dd51d0418fedd6e7bc
parenta88c955fcfb49727d0ed86b47410f6555a8e69e4
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>
fs/file.c
fs/internal.h
io_uring/openclose.c