else if (!test_and_set_bit(B_ICredit, &b->flags))
credits--;
}
- /* FIXME: should I check PinPending rather than the different
- * inode types?
- * And do I only need NCredit if already dirty ... or something
+ /* We need N*Credits if this block might need to be
+ * phase-flipped and remain pinned in the next
+ * phase. i.e. index blocks and accounting blocks.
*/
if (test_bit(B_Index, &b->flags) ||
- LAFSI(b->inode)->type == TypeInodeFile ||
- LAFSI(b->inode)->type == TypeOrphanList ||
LAFSI(b->inode)->type == TypeQuota ||
- LAFSI(b->inode)->type == TypeDir ||
LAFSI(b->inode)->type == TypeSegmentMap) {
if (credits <= 0)
need += !test_bit(B_NCredit, &b->flags);