diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-02-27 17:58:13 +0100 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-03-06 10:17:29 -0600 |
commit | 32fb9a147bacac55a6f9969b9d0e114e9186e25d (patch) | |
tree | 1c595e45f093623a53aa4f5a9a2cc9107a61785a /include/linux | |
parent | b6450528555285c01ea6d9eb1b5f1fc8f6856832 (diff) |
fs: fs_struct use seqlock
Replace the open coded seqlock with a real one, so RT can handle it.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fs_struct.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 003dc0fd7347..f748403cf1b4 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h @@ -2,13 +2,11 @@ #define _LINUX_FS_STRUCT_H #include <linux/path.h> -#include <linux/spinlock.h> #include <linux/seqlock.h> struct fs_struct { int users; - spinlock_t lock; - seqcount_t seq; + seqlock_t lock; int umask; int in_exec; struct path root, pwd; @@ -26,29 +24,29 @@ extern int unshare_fs_struct(void); static inline void get_fs_root(struct fs_struct *fs, struct path *root) { - spin_lock(&fs->lock); + seq_spin_lock(&fs->lock); *root = fs->root; path_get(root); - spin_unlock(&fs->lock); + seq_spin_unlock(&fs->lock); } static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd) { - spin_lock(&fs->lock); + seq_spin_lock(&fs->lock); *pwd = fs->pwd; path_get(pwd); - spin_unlock(&fs->lock); + seq_spin_unlock(&fs->lock); } static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, struct path *pwd) { - spin_lock(&fs->lock); + seq_spin_lock(&fs->lock); *root = fs->root; path_get(root); *pwd = fs->pwd; path_get(pwd); - spin_unlock(&fs->lock); + seq_spin_unlock(&fs->lock); } #endif /* _LINUX_FS_STRUCT_H */ |