author: Johannes Weiner <hannes@cmpxchg.org> 2014-04-03 14:47:49 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2014-04-03 16:21:01 -0700
commit: 91b0abe36a7b2b3b02d7500925a5f8455334f0e5
parent: 0cd6144aadd2afd19d1aca880153530c52957604
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 4bcdad3c9361..e6905152c39f 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -503,6 +503,7 @@ void clear_inode(struct inode *inode)
*/
spin_lock_irq(&inode->i_data.tree_lock);
BUG_ON(inode->i_data.nrpages);
+ BUG_ON(inode->i_data.nrshadows);
spin_unlock_irq(&inode->i_data.tree_lock);
BUG_ON(!list_empty(&inode->i_data.private_list));
BUG_ON(!(inode->i_state & I_FREEING));
@@ -548,8 +549,7 @@ static void evict(struct inode *inode)
if (op->evict_inode) {
op->evict_inode(inode);
} else {
- if (inode->i_data.nrpages)
- truncate_inode_pages(&inode->i_data, 0);
+ truncate_inode_pages_final(&inode->i_data);
clear_inode(inode);
}
if (S_ISBLK(inode->i_mode) && inode->i_bdev)