diff options
| author | Christoph Hellwig <hch@infradead.org> | 2002-05-19 19:40:16 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-05-19 19:40:16 -0700 |
| commit | bd2b0c85edfa015fdb4990ad07ad10e94ea885a4 (patch) | |
| tree | 60f6fe44b83ad5a7b03d142c5be3f557614e7d6b /include/linux | |
| parent | 43a3a37b90928f55410aba9378891edda3de1fa9 (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')
| -rw-r--r-- | include/linux/amigaffs.h | 1 | ||||
| -rw-r--r-- | include/linux/blk.h | 1 | ||||
| -rw-r--r-- | include/linux/fs.h | 13 | ||||
| -rw-r--r-- | include/linux/hfs_sysdep.h | 2 | ||||
| -rw-r--r-- | include/linux/locks.h | 28 | ||||
| -rw-r--r-- | include/linux/nbd.h | 1 | ||||
| -rw-r--r-- | include/linux/raid/md.h | 1 | ||||
| -rw-r--r-- | include/linux/swap.h | 1 | ||||
| -rw-r--r-- | include/linux/ufs_fs.h | 1 |
9 files changed, 16 insertions, 33 deletions
diff --git a/include/linux/amigaffs.h b/include/linux/amigaffs.h index 535c3bf41b9a..f02e8cbd0131 100644 --- a/include/linux/amigaffs.h +++ b/include/linux/amigaffs.h @@ -2,7 +2,6 @@ #define AMIGAFFS_H #include <linux/types.h> -#include <linux/locks.h> #include <asm/byteorder.h> diff --git a/include/linux/blk.h b/include/linux/blk.h index 9be0913f6069..62d37b2b4c17 100644 --- a/include/linux/blk.h +++ b/include/linux/blk.h @@ -3,7 +3,6 @@ #include <linux/blkdev.h> #include <linux/elevator.h> -#include <linux/locks.h> #include <linux/config.h> #include <linux/spinlock.h> #include <linux/compiler.h> 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); diff --git a/include/linux/hfs_sysdep.h b/include/linux/hfs_sysdep.h index 62fcf2ea311f..a08d5aa9e39d 100644 --- a/include/linux/hfs_sysdep.h +++ b/include/linux/hfs_sysdep.h @@ -19,8 +19,8 @@ #include <linux/slab.h> #include <linux/types.h> -#include <linux/locks.h> #include <linux/fs.h> +#include <linux/sched.h> #include <asm/byteorder.h> #include <asm/unaligned.h> diff --git a/include/linux/locks.h b/include/linux/locks.h deleted file mode 100644 index a380c5e4f0bb..000000000000 --- a/include/linux/locks.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _LINUX_LOCKS_H -#define _LINUX_LOCKS_H - -#ifndef _LINUX_MM_H -#include <linux/mm.h> -#endif -#ifndef _LINUX_PAGEMAP_H -#include <linux/pagemap.h> -#endif - -/* - * super-block locking. Again, interrupts may only unlock - * a super-block (although even this isn't done right now. - * nfs may need it). - */ - -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); -} - -#endif /* _LINUX_LOCKS_H */ - diff --git a/include/linux/nbd.h b/include/linux/nbd.h index b6120317731d..556b847804ca 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -22,7 +22,6 @@ #ifdef MAJOR_NR -#include <linux/locks.h> #include <asm/semaphore.h> #define LOCAL_END_REQUEST diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index bf586df47298..cb6332482af2 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -31,7 +31,6 @@ #include <linux/delay.h> #include <net/checksum.h> #include <linux/random.h> -#include <linux/locks.h> #include <linux/kernel_stat.h> #include <asm/io.h> #include <linux/completion.h> diff --git a/include/linux/swap.h b/include/linux/swap.h index 1674b5acd6f7..3a376842c21c 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -91,6 +91,7 @@ struct swap_info_struct { int next; /* next entry on swap list */ }; +struct inode; extern int nr_swap_pages; /* Swap 50% full? Release swapcache more aggressively.. */ diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 609d0dab2c6f..faccf5ad22d5 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h @@ -31,6 +31,7 @@ #include <linux/kernel.h> #include <linux/time.h> #include <linux/stat.h> +#include <linux/fs.h> #define UFS_BBLOCK 0 #define UFS_BBSIZE 8192 |
