From: NeilBrown Date: Fri, 17 Sep 2010 05:47:34 +0000 (+1000) Subject: Simplify test in lafs_refile X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=a49771ddc4b0be340183e46001dd14b34acdbe13;p=LaFS.git Simplify test in lafs_refile If index block has non-zero pending_cnt, then it must be dirty or realloc, so we can drop a test here. Signed-off-by: NeilBrown --- diff --git a/index.c b/index.c index a68823c..d5adfe7 100644 --- a/index.c +++ b/index.c @@ -938,10 +938,7 @@ void lafs_refile(struct block *b, int dec) /* See if we still need to be pinned */ if (test_bit(B_Pinned, &b->flags) && !test_bit(B_Dirty, &b->flags) && - !test_bit(B_Realloc, &b->flags) && - (!test_bit(B_Index, &b->flags) || - iblk(b)->uninc_table.pending_cnt == 0) - ) { + !test_bit(B_Realloc, &b->flags)) { /* Don't need to be Pinned any more */ if (test_and_clear_bit(B_Pinned, &b->flags)) { if (!list_empty_careful(&b->lru)) {