Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin LaHaise <bcrl@toomuch.toronto.redhat.com>2002-03-07 05:15:45 -0500
committerBenjamin LaHaise <bcrl@toomuch.toronto.redhat.com>2002-03-07 05:15:45 -0500
commit80f48a53fce1e188a3da73241c4e5ddbe65c5588 (patch)
treea824729550bfd8948171f2a0f1201b7872c52c4f
parent3a6578ca745093ff7394f136fc2619c47c491a19 (diff)
Fix a bug in fs/inode.c that would result in inodes not being properly synced for O_SYNC writes
-rw-r--r--fs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/inode.c b/fs/inode.c
index b7db8ac27f80..f4acc1d9ca9f 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -291,15 +291,15 @@ static inline void __sync_one(struct inode *inode, int sync)
static inline void sync_one(struct inode *inode, int sync)
{
- if (inode->i_state & I_LOCK) {
+ while (inode->i_state & I_LOCK) {
__iget(inode);
spin_unlock(&inode_lock);
__wait_on_inode(inode);
iput(inode);
spin_lock(&inode_lock);
- } else {
- __sync_one(inode, sync);
}
+
+ __sync_one(inode, sync);
}
static inline void sync_list(struct list_head *head)