diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2fe6e3f900ba..cac7b1ef9543 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -276,7 +276,7 @@ extern int dir_notify_enable; | |||
276 | #include <linux/radix-tree.h> | 276 | #include <linux/radix-tree.h> |
277 | #include <linux/prio_tree.h> | 277 | #include <linux/prio_tree.h> |
278 | #include <linux/init.h> | 278 | #include <linux/init.h> |
279 | #include <linux/sched.h> | 279 | #include <linux/pid.h> |
280 | #include <linux/mutex.h> | 280 | #include <linux/mutex.h> |
281 | 281 | ||
282 | #include <asm/atomic.h> | 282 | #include <asm/atomic.h> |
@@ -977,36 +977,13 @@ enum { | |||
977 | #define vfs_check_frozen(sb, level) \ | 977 | #define vfs_check_frozen(sb, level) \ |
978 | wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) | 978 | wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) |
979 | 979 | ||
980 | static inline void get_fs_excl(void) | 980 | #define get_fs_excl() atomic_inc(¤t->fs_excl) |
981 | { | 981 | #define put_fs_excl() atomic_dec(¤t->fs_excl) |
982 | atomic_inc(¤t->fs_excl); | 982 | #define has_fs_excl() atomic_read(¤t->fs_excl) |
983 | } | ||
984 | |||
985 | static inline void put_fs_excl(void) | ||
986 | { | ||
987 | atomic_dec(¤t->fs_excl); | ||
988 | } | ||
989 | |||
990 | static inline int has_fs_excl(void) | ||
991 | { | ||
992 | return atomic_read(¤t->fs_excl); | ||
993 | } | ||
994 | 983 | ||
995 | 984 | /* not quite ready to be deprecated, but... */ | |
996 | /* | 985 | extern void lock_super(struct super_block *); |
997 | * Superblock locking. | 986 | extern void unlock_super(struct super_block *); |
998 | */ | ||
999 | static inline void lock_super(struct super_block * sb) | ||
1000 | { | ||
1001 | get_fs_excl(); | ||
1002 | mutex_lock(&sb->s_lock); | ||
1003 | } | ||
1004 | |||
1005 | static inline void unlock_super(struct super_block * sb) | ||
1006 | { | ||
1007 | put_fs_excl(); | ||
1008 | mutex_unlock(&sb->s_lock); | ||
1009 | } | ||
1010 | 987 | ||
1011 | /* | 988 | /* |
1012 | * VFS helper functions.. | 989 | * VFS helper functions.. |