aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h37
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
980static inline void get_fs_excl(void) 980#define get_fs_excl() atomic_inc(&current->fs_excl)
981{ 981#define put_fs_excl() atomic_dec(&current->fs_excl)
982 atomic_inc(&current->fs_excl); 982#define has_fs_excl() atomic_read(&current->fs_excl)
983}
984
985static inline void put_fs_excl(void)
986{
987 atomic_dec(&current->fs_excl);
988}
989
990static inline int has_fs_excl(void)
991{
992 return atomic_read(&current->fs_excl);
993}
994 983
995 984/* not quite ready to be deprecated, but... */
996/* 985extern void lock_super(struct super_block *);
997 * Superblock locking. 986extern void unlock_super(struct super_block *);
998 */
999static inline void lock_super(struct super_block * sb)
1000{
1001 get_fs_excl();
1002 mutex_lock(&sb->s_lock);
1003}
1004
1005static 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..