diff options
| author | William Lee Irwin III <wli@holomorphy.com> | 2004-10-18 18:00:17 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-18 18:00:17 -0700 |
| commit | 493267b6ec40026be65e3564fd24b879be3c06d1 (patch) | |
| tree | bd97e65be150c6cc5788e527193a912f3bf68877 /include/linux | |
| parent | 525b64cdbd0401b8d3cb5642159e5ec8e49290b7 (diff) | |
[PATCH] eliminate inode waitqueue hashtable
Eliminate the inode waitqueue hashtable using bit_waitqueue() via
wait_on_bit() and wake_up_bit() to locate the waitqueue head associated
with a bit.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 3 | ||||
| -rw-r--r-- | include/linux/writeback.h | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4f6fe6b575a8..2a13baa4250b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -981,7 +981,8 @@ struct super_operations { #define I_DIRTY_SYNC 1 /* Not dirty enough for O_DATASYNC */ #define I_DIRTY_DATASYNC 2 /* Data-related inode changes pending */ #define I_DIRTY_PAGES 4 /* Data-related inode changes pending */ -#define I_LOCK 8 +#define __I_LOCK 3 +#define I_LOCK (1 << __I_LOCK) #define I_FREEING 16 #define I_CLEAR 32 #define I_NEW 64 diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 7c165c334be5..1c9994fe2acc 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -68,7 +68,7 @@ struct writeback_control { */ void writeback_inodes(struct writeback_control *wbc); void wake_up_inode(struct inode *inode); -void __wait_on_inode(struct inode * inode); +int inode_wait(void *); void sync_inodes_sb(struct super_block *, int wait); void sync_inodes(int wait); @@ -76,8 +76,8 @@ void sync_inodes(int wait); static inline void wait_on_inode(struct inode *inode) { might_sleep(); - if (inode->i_state & I_LOCK) - __wait_on_inode(inode); + wait_on_bit(&inode->i_state, __I_LOCK, inode_wait, + TASK_UNINTERRUPTIBLE); } /* |
