Skip to content

Commit

Permalink
nilfs2: stop marking metadata inode dirty within btree operations
Browse files Browse the repository at this point in the history
Since metadata file routines mark the inode dirty after they
successfully changed bmap objects, nilfs_mdt_mark_dirty() calls in
nilfs_bmap_add_blocks() and nilfs_bmap_sub_blocks() are redundant.

This removes these overlapping calls from the bmap routines.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  • Loading branch information
Ryusuke Konishi committed Nov 20, 2009
1 parent 30db4e6 commit 09bf4aa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/nilfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,18 +402,14 @@ int nilfs_bmap_test_and_clear_dirty(struct nilfs_bmap *bmap)
void nilfs_bmap_add_blocks(const struct nilfs_bmap *bmap, int n)
{
inode_add_bytes(bmap->b_inode, (1 << bmap->b_inode->i_blkbits) * n);
if (NILFS_MDT(bmap->b_inode))
nilfs_mdt_mark_dirty(bmap->b_inode);
else
if (!NILFS_MDT(bmap->b_inode))
mark_inode_dirty(bmap->b_inode);
}

void nilfs_bmap_sub_blocks(const struct nilfs_bmap *bmap, int n)
{
inode_sub_bytes(bmap->b_inode, (1 << bmap->b_inode->i_blkbits) * n);
if (NILFS_MDT(bmap->b_inode))
nilfs_mdt_mark_dirty(bmap->b_inode);
else
if (!NILFS_MDT(bmap->b_inode))
mark_inode_dirty(bmap->b_inode);
}

Expand Down

0 comments on commit 09bf4aa

Please sign in to comment.