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>
This commit is contained in:

committed by
Linus Torvalds

parent
2e6883bdf4
commit
1c0eeaf569
@@ -69,7 +69,6 @@ struct writeback_control {
|
||||
* fs/fs-writeback.c
|
||||
*/
|
||||
void writeback_inodes(struct writeback_control *wbc);
|
||||
void wake_up_inode(struct inode *inode);
|
||||
int inode_wait(void *);
|
||||
void sync_inodes_sb(struct super_block *, int wait);
|
||||
void sync_inodes(int wait);
|
||||
@@ -81,6 +80,13 @@ static inline void wait_on_inode(struct inode *inode)
|
||||
wait_on_bit(&inode->i_state, __I_LOCK, inode_wait,
|
||||
TASK_UNINTERRUPTIBLE);
|
||||
}
|
||||
static inline void inode_sync_wait(struct inode *inode)
|
||||
{
|
||||
might_sleep();
|
||||
wait_on_bit(&inode->i_state, __I_SYNC, inode_wait,
|
||||
TASK_UNINTERRUPTIBLE);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* mm/page-writeback.c
|
||||
|
Reference in New Issue
Block a user