From a49771ddc4b0be340183e46001dd14b34acdbe13 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 17 Sep 2010 15:47:34 +1000 Subject: [PATCH] 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 --- index.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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)) { -- 2.39.5