static void account_shadows(struct super_block *sb) { struct logfs_super *super = logfs_super(sb); struct inode *inode = super->s_master_inode; struct logfs_inode *li = logfs_inode(inode); struct shadow_tree *tree = &super->s_shadow_tree; btree_grim_visitor64(&tree->new, (unsigned long)sb, account_shadow); btree_grim_visitor64(&tree->old, (unsigned long)sb, account_shadow); btree_grim_visitor32(&tree->segment_map, 0, NULL); tree->no_shadowed_segments = 0; if (li->li_block) { li->li_block->ops->free_block(sb, li->li_block); } BUG_ON((s64)li->li_used_bytes < 0); }
static void account_shadows(struct super_block *sb) { struct logfs_super *super = logfs_super(sb); struct inode *inode = super->s_master_inode; struct logfs_inode *li = logfs_inode(inode); struct shadow_tree *tree = &super->s_shadow_tree; btree_grim_visitor64(&tree->new, (unsigned long)sb, account_shadow); btree_grim_visitor64(&tree->old, (unsigned long)sb, account_shadow); if (li->li_block) { /* * We never actually use the structure, when attached to the * master inode. But it is easier to always free it here than * to have checks in several places elsewhere when allocating * it. */ li->li_block->ops->free_block(sb, li->li_block); } BUG_ON((s64)li->li_used_bytes < 0); }