Skip to content

Commit 5b8ed52

Browse files
mjguzikbrauner
authored andcommitted
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>
1 parent 723cd98 commit 5b8ed52

17 files changed

Lines changed: 20 additions & 8 deletions

File tree

fs/9p/acl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <linux/module.h>
88
#include <linux/fs.h>
9+
#include <linux/fs_struct.h>
910
#include <net/9p/9p.h>
1011
#include <net/9p/client.h>
1112
#include <linux/slab.h>

fs/btrfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/blk-cgroup.h>
1010
#include <linux/file.h>
1111
#include <linux/fs.h>
12+
#include <linux/fs_struct.h>
1213
#include <linux/pagemap.h>
1314
#include <linux/highmem.h>
1415
#include <linux/time.h>

fs/f2fs/acl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*
1010
* Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de>
1111
*/
12+
#include <linux/fs_struct.h>
1213
#include <linux/f2fs_fs.h>
1314
#include "f2fs.h"
1415
#include "xattr.h"

fs/fat/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/unaligned.h>
2323
#include <linux/random.h>
2424
#include <linux/iversion.h>
25+
#include <linux/fs_struct.h>
2526
#include "fat.h"
2627

2728
#ifndef CONFIG_FAT_DEFAULT_IOCHARSET

fs/fs_struct.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,6 @@ int unshare_fs_struct(void)
146146
}
147147
EXPORT_SYMBOL_GPL(unshare_fs_struct);
148148

149-
int current_umask(void)
150-
{
151-
return current->fs->umask;
152-
}
153-
EXPORT_SYMBOL(current_umask);
154-
155149
/* to be mentioned only in INIT_TASK */
156150
struct fs_struct init_fs = {
157151
.users = 1,

fs/hfsplus/options.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/string.h>
1313
#include <linux/kernel.h>
1414
#include <linux/sched.h>
15+
#include <linux/fs_struct.h>
1516
#include <linux/fs_context.h>
1617
#include <linux/fs_parser.h>
1718
#include <linux/nls.h>

fs/hpfs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "hpfs_fn.h"
1111
#include <linux/module.h>
12+
#include <linux/fs_struct.h>
1213
#include <linux/fs_context.h>
1314
#include <linux/fs_parser.h>
1415
#include <linux/init.h>

fs/nilfs2/nilfs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/buffer_head.h>
1515
#include <linux/spinlock.h>
1616
#include <linux/blkdev.h>
17+
#include <linux/fs_struct.h>
1718
#include <linux/nilfs2_api.h>
1819
#include <linux/nilfs2_ondisk.h>
1920
#include "the_nilfs.h"

fs/ntfs3/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include <linux/buffer_head.h>
5252
#include <linux/exportfs.h>
5353
#include <linux/fs.h>
54+
#include <linux/fs_struct.h>
5455
#include <linux/fs_context.h>
5556
#include <linux/fs_parser.h>
5657
#include <linux/log2.h>

fs/ocfs2/acl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/module.h>
1414
#include <linux/slab.h>
1515
#include <linux/string.h>
16+
#include <linux/fs_struct.h>
1617

1718
#include <cluster/masklog.h>
1819

0 commit comments

Comments
 (0)