summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-06-01 15:56:34 +0200
committerChristian Brauner <brauner@kernel.org>2026-06-29 10:38:48 +0200
commit21bcea3ef2025796a29ba88f2747d864ed535758 (patch)
tree37d723cb3d486273a3e58e055222277f3166bf2b /include
parentdc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff)
downloadlinux-next-21bcea3ef2025796a29ba88f2747d864ed535758.tar.gz
linux-next-21bcea3ef2025796a29ba88f2747d864ed535758.zip
fs: add switch_fs_struct()
Don't open-code the guts of replacing current's fs struct. Link: https://patch.msgid.link/20260601-work-kthread-nullfs-v4-1-77ee053060e0@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs_struct.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
index 0070764b790a..ade459383f92 100644
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -40,6 +40,8 @@ static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd)
read_sequnlock_excl(&fs->seq);
}
+struct fs_struct *switch_fs_struct(struct fs_struct *new_fs);
+
extern bool current_chrooted(void);
static inline int current_umask(void)