summaryrefslogtreecommitdiffstats
path: root/fs/internal.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-01-19 15:41:52 -0700
committerJens Axboe <axboe@kernel.dk>2021-02-01 10:02:42 -0700
commit53dec2ea74f2ef360e8455439be96a780baa6097 (patch)
tree1310979e2c4fa2b604ed81061fbee004ef1d9e7a /fs/internal.h
parente342c807f556dbcee1370ab78af1d8faf497d771 (diff)
downloadlinux-53dec2ea74f2ef360e8455439be96a780baa6097.tar.bz2
fs: provide locked helper variant of close_fd_get_file()
Assumes current->files->file_lock is already held on invocation. Helps the caller check the file before removing the fd, if it needs to. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/internal.h')
-rw-r--r--fs/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/internal.h b/fs/internal.h
index 77c50befbfbe..c6c85f6ad598 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -132,6 +132,7 @@ extern struct file *do_file_open_root(struct dentry *, struct vfsmount *,
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 int __close_fd_get_file(unsigned int fd, struct file **res);
long do_sys_ftruncate(unsigned int fd, loff_t length, int small);
int chmod_common(const struct path *path, umode_t mode);