diff options
| author | Artem B. Bityuckiy <dedekind@infradead.org> | 2005-07-06 15:43:18 +0100 |
|---|---|---|
| committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-07-06 19:40:38 +0200 |
| commit | b3539219c9ea20ebf6a5ea3cc534f423a3607c41 (patch) | |
| tree | d17c31c0eac0a7290ba5011b59a100fd9e9c9532 /include/linux/fs.h | |
| parent | 6430a8def12edebc1c9c7c2621d33ca0e8653c33 (diff) | |
| parent | a18bcb7450840f07a772a45229de4811d930f461 (diff) | |
Merge with rsync://fileserver/linux
Update to 2.6.12-rc3
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3ae8e37bdfc8..047bde30836a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -213,6 +213,7 @@ extern int dir_notify_enable; #include <linux/radix-tree.h> #include <linux/prio_tree.h> #include <linux/init.h> +#include <linux/sched.h> #include <asm/atomic.h> #include <asm/semaphore.h> @@ -822,16 +823,34 @@ enum { #define vfs_check_frozen(sb, level) \ wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) +static inline void get_fs_excl(void) +{ + atomic_inc(¤t->fs_excl); +} + +static inline void put_fs_excl(void) +{ + atomic_dec(¤t->fs_excl); +} + +static inline int has_fs_excl(void) +{ + return atomic_read(¤t->fs_excl); +} + + /* * Superblock locking. */ static inline void lock_super(struct super_block * sb) { + get_fs_excl(); down(&sb->s_lock); } static inline void unlock_super(struct super_block * sb) { + put_fs_excl(); up(&sb->s_lock); } |
