Skip to content

Commit

Permalink
nilfs2: allow nilfs_clear_inode to clear metadata file inodes
Browse files Browse the repository at this point in the history
Allows clear inode function (nilfs_clear_inode) to handle metadata
files that uses bitmap-based object alloctor.  DAT and ifile
correspond to this.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  • Loading branch information
Ryusuke Konishi committed Oct 23, 2010
1 parent b453c95 commit 518d1a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/nilfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ void nilfs_truncate(struct inode *inode)
static void nilfs_clear_inode(struct inode *inode)
{
struct nilfs_inode_info *ii = NILFS_I(inode);
struct nilfs_mdt_info *mdi = NILFS_MDT(inode);

/*
* Free resources allocated in nilfs_read_inode(), here.
Expand All @@ -682,6 +683,9 @@ static void nilfs_clear_inode(struct inode *inode)
brelse(ii->i_bh);
ii->i_bh = NULL;

if (mdi && mdi->mi_palloc_cache)
nilfs_palloc_destroy_cache(inode);

if (test_bit(NILFS_I_BMAP, &ii->i_state))
nilfs_bmap_clear(ii->i_bmap);

Expand Down

0 comments on commit 518d1a6

Please sign in to comment.