]> git.neil.brown.name Git - LaFS.git/commitdiff
Simplify test in lafs_refile
authorNeilBrown <neilb@suse.de>
Fri, 17 Sep 2010 05:47:34 +0000 (15:47 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 17 Sep 2010 05:47:34 +0000 (15:47 +1000)
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 <neilb@suse.de>
index.c

diff --git a/index.c b/index.c
index a68823cd32410f48cc21b46b97fc49e4830d6a72..d5adfe788780d1bba6b76df0d7ad35906aa26339 100644 (file)
--- 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)) {