diff options
author | Christian Brauner <brauner@kernel.org> | 2024-02-08 19:10:45 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-02-25 12:05:08 +0100 |
commit | bac0a9e56e1fd14b227ab57142eca6f7bc6e6115 (patch) | |
tree | 685eb551d85a634533ec89b3eb99f505b718717e /include/linux | |
parent | 0873add0e0cd74fe3c7dae3fcfd610cbc1d08bd1 (diff) |
file: add alloc_file_pseudo_noaccount()
When we open block devices as files we want to make sure to not charge
them against the open file limit of the caller as that can cause
spurious failures.
Link: https://lore.kernel.org/r/20240123-vfs-bdev-file-v2-1-adbd023e19cc@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/file.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/file.h b/include/linux/file.h index 6834a29338c4..169692cb1906 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -24,6 +24,8 @@ struct inode; struct path; extern struct file *alloc_file_pseudo(struct inode *, struct vfsmount *, const char *, int flags, const struct file_operations *); +extern struct file *alloc_file_pseudo_noaccount(struct inode *, struct vfsmount *, + const char *, int flags, const struct file_operations *); extern struct file *alloc_file_clone(struct file *, int flags, const struct file_operations *); |