diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-02-27 17:58:13 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-03-06 11:11:39 -0500 |
commit | e558648032a88644e8a9ed3bc26497f6f9b7797c (patch) | |
tree | 3131778c4860d6078fbef7aa38ecc45c8bb5f712 /include | |
parent | 61ffd505fd96756629f9954491780ba2e148d9b7 (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
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-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 */ |