aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-10-18 13:55:46 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2006-12-04 02:00:24 -0500
commit914e26379decf1fd984b22e51fd2e4209b7a7f1b (patch)
tree4f20ee40e959699e344cdff0e117d309d238f6be /include/linux/fs.h
parentf6a570333e554b48ad589e7137c77c57809eee81 (diff)
[PATCH] severing fs.h, radix-tree.h -> sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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..