]> git.neil.brown.name Git - LaFS.git/commitdiff
Make sure we io_wait when we clear B_Writeback
authorNeilBrown <neilb@suse.de>
Sat, 26 Jun 2010 04:24:47 +0000 (14:24 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 27 Jun 2010 23:15:02 +0000 (09:15 +1000)
There was one path where we didn't.

Signed-off-by: NeilBrown <neilb@suse.de>
io.c

diff --git a/io.c b/io.c
index 0bbeb215231b2b5afdc28fd664f355adc6f01db3..b6837f596d972efe2528205e4e834b0275d78a0c 100644 (file)
--- a/io.c
+++ b/io.c
@@ -237,12 +237,11 @@ void lafs_writeback_done(struct block *b)
         * If it is last on page, release page as well.
         */
 
-       if (test_bit(B_Index, &b->flags))
+       if (test_bit(B_Index, &b->flags)) {
                clear_bit(B_Writeback, &b->flags);
-       else
+               lafs_io_wake(b);
+       } else
                lafs_iocheck_writeback(dblk(b), 1);
-
-       lafs_io_wake(b);
 }
 
 void lafs_iocheck_block(struct datablock *db, int unlock)
@@ -308,6 +307,8 @@ void lafs_iocheck_writeback(struct datablock *db, int unlock)
 
        if (havewrite)
                end_page_writeback(page);
+       if (unlock)
+               lafs_io_wake(&db->b);
 }
 
 int __must_check