From 87f58a9ad3a219cf39e9a46fa13fbe07a4b689a1 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 18 Oct 2010 10:46:18 +1100 Subject: [PATCH] rollforward: user writeback during add_block_address For consistency with other callers of lafs_add_block_address, hold writeback rather than iolock over this call. Signed-off-by: NeilBrown --- roll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roll.c b/roll.c index 16e6d5e..0e6bda4 100644 --- a/roll.c +++ b/roll.c @@ -461,14 +461,14 @@ roll_block(struct fs *fs, int fsnum, int inum, int trunc, 0, fs->phase, 1); blk->b.physaddr = baddr; lafs_dirty_iblock(blk->b.parent, 0); - /* FIXME maybe set Writeback and unlock */ + set_bit(B_Writeback, &blk->b.flags); + lafs_iounlock_block(&blk->b); if (lafs_add_block_address(fs, &blk->b) == 0) /* FIXME if the table becomes full, we have a problem... */ LAFS_BUG(1, &blk->b); dprintk("Allocated block %lu to %llu\n", (unsigned long)bnum, baddr); - /* FIXME maybe clear Writeback instead */ - lafs_iounlock_block(&blk->b); + lafs_writeback_done(&blk->b); clear_bit(B_PinPending, &blk->b.flags); /* If we had previously read this block for some reason, -- 2.39.5