summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2002-05-19 19:40:16 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-05-19 19:40:16 -0700
commitbd2b0c85edfa015fdb4990ad07ad10e94ea885a4 (patch)
tree60f6fe44b83ad5a7b03d142c5be3f557614e7d6b /include/linux/fs.h
parent43a3a37b90928f55410aba9378891edda3de1fa9 (diff)
[PATCH] get rid of <linux/locks.h>
The lock.h header contained some hand-crafted lcoking routines from the pre-SMP days. In 2.5 only lock_super/unlock_super are left, guarded by a number of completly unrelated (!) includes. This patch moves lock_super/unlock_super to fs.h, which defined struct super_block that is needed for those to operate it, removes locks.h and updates all caller to not include it and add the missing, previously nested includes where needed.
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index df5c5fdb0c6f..ab0a05dc8e26 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -683,6 +683,19 @@ struct super_block {
};
/*
+ * Superblock locking.
+ */
+static inline void lock_super(struct super_block * sb)
+{
+ down(&sb->s_lock);
+}
+
+static inline void unlock_super(struct super_block * sb)
+{
+ up(&sb->s_lock);
+}
+
+/*
* VFS helper functions..
*/
extern int vfs_create(struct inode *, struct dentry *, int);