]> git.hungrycats.org Git - linux/commitdiff
Fix a bug in fs/inode.c that would result in inodes not being properly synced for...
authorBenjamin LaHaise <bcrl@toomuch.toronto.redhat.com>
Thu, 7 Mar 2002 10:15:45 +0000 (05:15 -0500)
committerBenjamin LaHaise <bcrl@toomuch.toronto.redhat.com>
Thu, 7 Mar 2002 10:15:45 +0000 (05:15 -0500)
fs/inode.c

index b7db8ac27f80756e722c1e5c302b90d5fd9e1f62..f4acc1d9ca9fb2b48d7ae17d96f1241b2dadb4f6 100644 (file)
@@ -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)