diff options
author | Joern Engel <joern@wohnheim.fh-wedel.de> | 2007-10-17 02:30:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:02 -0400 |
commit | 1c0eeaf5698597146ed9b873e2f9e0961edcf0f9 (patch) | |
tree | 5265eac8437e8ce517a62db8fe2bd99db5b7019b /include/linux/writeback.h | |
parent | 2e6883bdf49abd0e7f0d9b6297fc3be7ebb2250b (diff) |
introduce I_SYNC
I_LOCK was used for several unrelated purposes, which caused deadlock
situations in certain filesystems as a side effect. One of the purposes
now uses the new I_SYNC bit.
Also document the various bits and change their order from historical to
logical.
[bunk@stusta.de: make fs/inode.c:wake_up_inode() static]
Signed-off-by: Joern Engel <joern@wohnheim.fh-wedel.de>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: David Chinner <dgc@sgi.com>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r-- | include/linux/writeback.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 1200868a5dee..bef7d66601cb 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -69,7 +69,6 @@ struct writeback_control { | |||
69 | * fs/fs-writeback.c | 69 | * fs/fs-writeback.c |
70 | */ | 70 | */ |
71 | void writeback_inodes(struct writeback_control *wbc); | 71 | void writeback_inodes(struct writeback_control *wbc); |
72 | void wake_up_inode(struct inode *inode); | ||
73 | int inode_wait(void *); | 72 | int inode_wait(void *); |
74 | void sync_inodes_sb(struct super_block *, int wait); | 73 | void sync_inodes_sb(struct super_block *, int wait); |
75 | void sync_inodes(int wait); | 74 | void sync_inodes(int wait); |
@@ -81,6 +80,13 @@ static inline void wait_on_inode(struct inode *inode) | |||
81 | wait_on_bit(&inode->i_state, __I_LOCK, inode_wait, | 80 | wait_on_bit(&inode->i_state, __I_LOCK, inode_wait, |
82 | TASK_UNINTERRUPTIBLE); | 81 | TASK_UNINTERRUPTIBLE); |
83 | } | 82 | } |
83 | static inline void inode_sync_wait(struct inode *inode) | ||
84 | { | ||
85 | might_sleep(); | ||
86 | wait_on_bit(&inode->i_state, __I_SYNC, inode_wait, | ||
87 | TASK_UNINTERRUPTIBLE); | ||
88 | } | ||
89 | |||
84 | 90 | ||
85 | /* | 91 | /* |
86 | * mm/page-writeback.c | 92 | * mm/page-writeback.c |