mirror of https://github.com/torvalds/linux.git
fs: inline current_umask() and move it to fs_struct.h
There is no good reason to have this as a func call, other than avoiding the churn of adding fs_struct.h as needed. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://patch.msgid.link/20251104170448.630414-1-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
723cd9872d
commit
5b8ed52866
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <net/9p/9p.h>
|
||||
#include <net/9p/client.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <linux/blk-cgroup.h>
|
||||
#include <linux/file.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/time.h>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
*
|
||||
* Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de>
|
||||
*/
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/f2fs_fs.h>
|
||||
#include "f2fs.h"
|
||||
#include "xattr.h"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/unaligned.h>
|
||||
#include <linux/random.h>
|
||||
#include <linux/iversion.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include "fat.h"
|
||||
|
||||
#ifndef CONFIG_FAT_DEFAULT_IOCHARSET
|
||||
|
|
|
|||
|
|
@ -146,12 +146,6 @@ int unshare_fs_struct(void)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(unshare_fs_struct);
|
||||
|
||||
int current_umask(void)
|
||||
{
|
||||
return current->fs->umask;
|
||||
}
|
||||
EXPORT_SYMBOL(current_umask);
|
||||
|
||||
/* to be mentioned only in INIT_TASK */
|
||||
struct fs_struct init_fs = {
|
||||
.users = 1,
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/fs_context.h>
|
||||
#include <linux/fs_parser.h>
|
||||
#include <linux/nls.h>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "hpfs_fn.h"
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/fs_context.h>
|
||||
#include <linux/fs_parser.h>
|
||||
#include <linux/init.h>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/buffer_head.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/nilfs2_api.h>
|
||||
#include <linux/nilfs2_ondisk.h>
|
||||
#include "the_nilfs.h"
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
#include <linux/buffer_head.h>
|
||||
#include <linux/exportfs.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/fs_context.h>
|
||||
#include <linux/fs_parser.h>
|
||||
#include <linux/log2.h>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/fs_struct.h>
|
||||
|
||||
#include <cluster/masklog.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/writeback.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/crc-itu-t.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/fs_context.h>
|
||||
#include <linux/fs_parser.h>
|
||||
#include "omfs.h"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
*
|
||||
*/
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/filelock.h>
|
||||
#include <linux/backing-dev.h>
|
||||
#include <linux/stat.h>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
*
|
||||
*/
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/stat.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/pagemap.h>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/vfs.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <uapi/linux/magic.h>
|
||||
#include "cifsglob.h"
|
||||
#include "cifsproto.h"
|
||||
|
|
|
|||
|
|
@ -2336,8 +2336,6 @@ static inline void super_set_sysfs_name_generic(struct super_block *sb, const ch
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
extern int current_umask(void);
|
||||
|
||||
extern void ihold(struct inode * inode);
|
||||
extern void iput(struct inode *);
|
||||
int inode_update_timestamps(struct inode *inode, int flags);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#ifndef _LINUX_FS_STRUCT_H
|
||||
#define _LINUX_FS_STRUCT_H
|
||||
|
||||
#include <linux/sched.h>
|
||||
#include <linux/path.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/seqlock.h>
|
||||
|
|
@ -41,4 +42,9 @@ static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd)
|
|||
|
||||
extern bool current_chrooted(void);
|
||||
|
||||
static inline int current_umask(void)
|
||||
{
|
||||
return current->fs->umask;
|
||||
}
|
||||
|
||||
#endif /* _LINUX_FS_STRUCT_H */
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include <linux/path.h>
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/fs_struct.h>
|
||||
|
||||
enum { MAX_NESTED_LINKS = 8 };
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue