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 /fs/internal.h | |
parent | file: s/close_fd_get_file()/file_close_fd()/g (diff) | |
download | linux-24fa3ae9467f49dd9698fd884f2c6b13cc8ea12d.tar.xz linux-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 'fs/internal.h')
-rw-r--r-- | fs/internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/internal.h b/fs/internal.h index 273e6fd40d1b..a7469ddba9b6 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -179,7 +179,7 @@ extern struct file *do_file_open_root(const struct path *, const char *, const struct open_flags *); extern struct open_how build_open_how(int flags, umode_t mode); extern int build_open_flags(const struct open_how *how, struct open_flags *op); -extern struct file *__close_fd_get_file(unsigned int fd); +struct file *file_close_fd_locked(struct files_struct *files, unsigned fd); long do_sys_ftruncate(unsigned int fd, loff_t length, int small); int chmod_common(const struct path *path, umode_t mode); |