aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/inode.c')
-rw-r--r--fs/nilfs2/inode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index 2fd440d8d6b8..3a6967d14e1c 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -707,6 +707,7 @@ void nilfs_evict_inode(struct inode *inode)
707 struct nilfs_transaction_info ti; 707 struct nilfs_transaction_info ti;
708 struct super_block *sb = inode->i_sb; 708 struct super_block *sb = inode->i_sb;
709 struct nilfs_inode_info *ii = NILFS_I(inode); 709 struct nilfs_inode_info *ii = NILFS_I(inode);
710 int ret;
710 711
711 if (inode->i_nlink || !ii->i_root || unlikely(is_bad_inode(inode))) { 712 if (inode->i_nlink || !ii->i_root || unlikely(is_bad_inode(inode))) {
712 if (inode->i_data.nrpages) 713 if (inode->i_data.nrpages)
@@ -725,8 +726,9 @@ void nilfs_evict_inode(struct inode *inode)
725 nilfs_mark_inode_dirty(inode); 726 nilfs_mark_inode_dirty(inode);
726 end_writeback(inode); 727 end_writeback(inode);
727 728
728 nilfs_ifile_delete_inode(ii->i_root->ifile, inode->i_ino); 729 ret = nilfs_ifile_delete_inode(ii->i_root->ifile, inode->i_ino);
729 atomic_dec(&ii->i_root->inodes_count); 730 if (!ret)
731 atomic_dec(&ii->i_root->inodes_count);
730 732
731 nilfs_clear_inode(inode); 733 nilfs_clear_inode(inode);
732 734