diff options
author | Dawid Osuchowski <linux@osuchow.ski> | 2024-04-26 09:58:54 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-04-26 10:33:05 +0200 |
commit | 55394d29c9e164f2e1991352f1dc8f973c4f1589 (patch) | |
tree | 026dd588d0aa4b25c53852bc2e23f1b5e84f30de /include/linux/anon_inodes.h | |
parent | 652efdeca5b142ee9c5197f45f64fc3d427d4b08 (diff) | |
download | linux-55394d29c9e164f2e1991352f1dc8f973c4f1589.tar.gz linux-55394d29c9e164f2e1991352f1dc8f973c4f1589.tar.bz2 linux-55394d29c9e164f2e1991352f1dc8f973c4f1589.zip |
fs: Create anon_inode_getfile_fmode()
Creates an anon_inode_getfile_fmode() function that works similarly to
anon_inode_getfile() with the addition of being able to set the fmode
member.
Signed-off-by: Dawid Osuchowski <linux@osuchow.ski>
Link: https://lore.kernel.org/r/20240426075854.4723-1-linux@osuchow.ski
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/anon_inodes.h')
-rw-r--r-- | include/linux/anon_inodes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/anon_inodes.h b/include/linux/anon_inodes.h index 93a5f16d03f3..edef565c2a1a 100644 --- a/include/linux/anon_inodes.h +++ b/include/linux/anon_inodes.h @@ -9,12 +9,17 @@ #ifndef _LINUX_ANON_INODES_H #define _LINUX_ANON_INODES_H +#include <linux/types.h> + struct file_operations; struct inode; struct file *anon_inode_getfile(const char *name, const struct file_operations *fops, void *priv, int flags); +struct file *anon_inode_getfile_fmode(const char *name, + const struct file_operations *fops, + void *priv, int flags, fmode_t f_mode); struct file *anon_inode_create_getfile(const char *name, const struct file_operations *fops, void *priv, int flags, |