diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-08-20 23:40:54 +0900 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-23 09:24:37 +0900 |
commit | 518d1a6a1d6610a014875a2fe3252e89b6260d2f (patch) | |
tree | 375624bb35302cac1c4acff40af16bf3ca681a48 /fs | |
parent | b453c95eb8d6a3b2348e9c7bc28a7d223cb640e3 (diff) | |
download | lwn-518d1a6a1d6610a014875a2fe3252e89b6260d2f.tar.gz lwn-518d1a6a1d6610a014875a2fe3252e89b6260d2f.zip |
nilfs2: allow nilfs_clear_inode to clear metadata file inodes
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nilfs2/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 3efef0ecfa24..5485dd12da64 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -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. @@ -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); |