Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Mateusz Guzik and committed by
Christian Brauner
5b8ed528 723cd987

+20 -8
+1
fs/9p/acl.c
··· 6 6 7 7 #include <linux/module.h> 8 8 #include <linux/fs.h> 9 + #include <linux/fs_struct.h> 9 10 #include <net/9p/9p.h> 10 11 #include <net/9p/client.h> 11 12 #include <linux/slab.h>
+1
fs/btrfs/inode.c
··· 9 9 #include <linux/blk-cgroup.h> 10 10 #include <linux/file.h> 11 11 #include <linux/fs.h> 12 + #include <linux/fs_struct.h> 12 13 #include <linux/pagemap.h> 13 14 #include <linux/highmem.h> 14 15 #include <linux/time.h>
+1
fs/f2fs/acl.c
··· 9 9 * 10 10 * Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de> 11 11 */ 12 + #include <linux/fs_struct.h> 12 13 #include <linux/f2fs_fs.h> 13 14 #include "f2fs.h" 14 15 #include "xattr.h"
+1
fs/fat/inode.c
··· 22 22 #include <linux/unaligned.h> 23 23 #include <linux/random.h> 24 24 #include <linux/iversion.h> 25 + #include <linux/fs_struct.h> 25 26 #include "fat.h" 26 27 27 28 #ifndef CONFIG_FAT_DEFAULT_IOCHARSET
-6
fs/fs_struct.c
··· 146 146 } 147 147 EXPORT_SYMBOL_GPL(unshare_fs_struct); 148 148 149 - int current_umask(void) 150 - { 151 - return current->fs->umask; 152 - } 153 - EXPORT_SYMBOL(current_umask); 154 - 155 149 /* to be mentioned only in INIT_TASK */ 156 150 struct fs_struct init_fs = { 157 151 .users = 1,
+1
fs/hfsplus/options.c
··· 12 12 #include <linux/string.h> 13 13 #include <linux/kernel.h> 14 14 #include <linux/sched.h> 15 + #include <linux/fs_struct.h> 15 16 #include <linux/fs_context.h> 16 17 #include <linux/fs_parser.h> 17 18 #include <linux/nls.h>
+1
fs/hpfs/super.c
··· 9 9 10 10 #include "hpfs_fn.h" 11 11 #include <linux/module.h> 12 + #include <linux/fs_struct.h> 12 13 #include <linux/fs_context.h> 13 14 #include <linux/fs_parser.h> 14 15 #include <linux/init.h>
+1
fs/nilfs2/nilfs.h
··· 14 14 #include <linux/buffer_head.h> 15 15 #include <linux/spinlock.h> 16 16 #include <linux/blkdev.h> 17 + #include <linux/fs_struct.h> 17 18 #include <linux/nilfs2_api.h> 18 19 #include <linux/nilfs2_ondisk.h> 19 20 #include "the_nilfs.h"
+1
fs/ntfs3/super.c
··· 51 51 #include <linux/buffer_head.h> 52 52 #include <linux/exportfs.h> 53 53 #include <linux/fs.h> 54 + #include <linux/fs_struct.h> 54 55 #include <linux/fs_context.h> 55 56 #include <linux/fs_parser.h> 56 57 #include <linux/log2.h>
+1
fs/ocfs2/acl.c
··· 13 13 #include <linux/module.h> 14 14 #include <linux/slab.h> 15 15 #include <linux/string.h> 16 + #include <linux/fs_struct.h> 16 17 17 18 #include <cluster/masklog.h> 18 19
+1
fs/omfs/inode.c
··· 14 14 #include <linux/writeback.h> 15 15 #include <linux/seq_file.h> 16 16 #include <linux/crc-itu-t.h> 17 + #include <linux/fs_struct.h> 17 18 #include <linux/fs_context.h> 18 19 #include <linux/fs_parser.h> 19 20 #include "omfs.h"
+1
fs/smb/client/file.c
··· 9 9 * 10 10 */ 11 11 #include <linux/fs.h> 12 + #include <linux/fs_struct.h> 12 13 #include <linux/filelock.h> 13 14 #include <linux/backing-dev.h> 14 15 #include <linux/stat.h>
+1
fs/smb/client/inode.c
··· 6 6 * 7 7 */ 8 8 #include <linux/fs.h> 9 + #include <linux/fs_struct.h> 9 10 #include <linux/stat.h> 10 11 #include <linux/slab.h> 11 12 #include <linux/pagemap.h>
+1
fs/smb/client/smb1ops.c
··· 7 7 8 8 #include <linux/pagemap.h> 9 9 #include <linux/vfs.h> 10 + #include <linux/fs_struct.h> 10 11 #include <uapi/linux/magic.h> 11 12 #include "cifsglob.h" 12 13 #include "cifsproto.h"
-2
include/linux/fs.h
··· 2336 2336 va_end(args); 2337 2337 } 2338 2338 2339 - extern int current_umask(void); 2340 - 2341 2339 extern void ihold(struct inode * inode); 2342 2340 extern void iput(struct inode *); 2343 2341 int inode_update_timestamps(struct inode *inode, int flags);
+6
include/linux/fs_struct.h
··· 2 2 #ifndef _LINUX_FS_STRUCT_H 3 3 #define _LINUX_FS_STRUCT_H 4 4 5 + #include <linux/sched.h> 5 6 #include <linux/path.h> 6 7 #include <linux/spinlock.h> 7 8 #include <linux/seqlock.h> ··· 41 40 } 42 41 43 42 extern bool current_chrooted(void); 43 + 44 + static inline int current_umask(void) 45 + { 46 + return current->fs->umask; 47 + } 44 48 45 49 #endif /* _LINUX_FS_STRUCT_H */
+1
include/linux/namei.h
··· 7 7 #include <linux/path.h> 8 8 #include <linux/fcntl.h> 9 9 #include <linux/errno.h> 10 + #include <linux/fs_struct.h> 10 11 11 12 enum { MAX_NESTED_LINKS = 8 }; 12 13