summaryrefslogtreecommitdiff
path: root/include/linux/fs_struct.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-12 14:08:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-12 14:08:35 +0300
commit4a12f38e23d10a5dbad6cce0abaadd10e5a1aa68 (patch)
tree533208f5479c17b9a7c162a425a967c7a7edf46b /include/linux/fs_struct.h
parent0d2f2f4f27694a2214701e7482ab7599ce4e5e77 (diff)
parent449d48b1b99fdaa076166e200132705ac2bee711 (diff)
downloadlinux-rolling-stable.tar.xz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fs_struct.h')
-rw-r--r--include/linux/fs_struct.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
index 783b48dedb72..baf200ab5c77 100644
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -8,8 +8,7 @@
struct fs_struct {
int users;
- spinlock_t lock;
- seqcount_spinlock_t seq;
+ seqlock_t seq;
int umask;
int in_exec;
struct path root, pwd;
@@ -26,18 +25,18 @@ extern int unshare_fs_struct(void);
static inline void get_fs_root(struct fs_struct *fs, struct path *root)
{
- spin_lock(&fs->lock);
+ read_seqlock_excl(&fs->seq);
*root = fs->root;
path_get(root);
- spin_unlock(&fs->lock);
+ read_sequnlock_excl(&fs->seq);
}
static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd)
{
- spin_lock(&fs->lock);
+ read_seqlock_excl(&fs->seq);
*pwd = fs->pwd;
path_get(pwd);
- spin_unlock(&fs->lock);
+ read_sequnlock_excl(&fs->seq);
}
extern bool current_chrooted(void);