]> git.neil.brown.name Git - LaFS.git/commitdiff
clean: never try to clean an InoIdx block.
authorNeil Brown <neilb@suse.de>
Wed, 25 Feb 2009 04:41:17 +0000 (15:41 +1100)
committerNeil Brown <neilb@suse.de>
Wed, 25 Feb 2009 04:41:17 +0000 (15:41 +1100)
If tempted to, get the matching data block instead.

clean.c

diff --git a/clean.c b/clean.c
index 5e74dbad5612c8b1cdfa66faaad7f84cb8f44f84..7b75d1b5ebf223a88bbe3d9ea685ae28440cbd2e 100644 (file)
--- a/clean.c
+++ b/clean.c
@@ -200,6 +200,11 @@ static struct block *first_in_seg(struct block *b, struct fs *fs, int dev, u32 s
                        spin_lock(&as->private_lock);
                }
        }
+       if (p && test_bit(B_InoIdx, &p->flags)) {
+               struct datablock *db = LAFSI(p->inode)->dblock;
+               p = &db->b;
+       }
+
        if (p)
                getref(p);
        spin_unlock(&as->private_lock);