From: Jeff Mahoney <jeffm@suse.com>
Subject: novfs: use evict_inode
Patch-mainline: When novfs is merged

 Upstream commit b57922d97fd6f79b6dbe6db0c4fd30d219fa08c1 removed
 support for ->clear_inode in favor of ->evict_inode.

 This patch implements support for ->evict_inode.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 fs/novfs/inode.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/fs/novfs/inode.c
+++ b/fs/novfs/inode.c
@@ -138,7 +138,7 @@ void update_inode(struct inode *Inode, s
 void novfs_read_inode(struct inode *inode);
 void novfs_write_inode(struct inode *inode);
 int novfs_notify_change(struct dentry *dentry, struct iattr *attr);
-void novfs_clear_inode(struct inode *inode);
+void novfs_evict_inode(struct inode *inode);
 int novfs_show_options(struct seq_file *s, struct vfsmount *m);
 
 int novfs_statfs(struct dentry *de, struct kstatfs *buf);
@@ -250,7 +250,7 @@ static struct inode_operations novfs_fil
 
 static struct super_operations novfs_ops = {
 	.statfs = novfs_statfs,
-	.evict_inode = novfs_clear_inode,
+	.evict_inode = novfs_evict_inode,
 	.drop_inode = generic_delete_inode,
 	.show_options = novfs_show_options,
 
@@ -3143,8 +3143,11 @@ int novfs_notify_change(struct dentry *d
 	return (0);
 }
 
-void novfs_clear_inode(struct inode *inode)
+void novfs_evict_inode(struct inode *inode)
 {
+	truncate_inode_pages(&inode->i_data, 0);
+	end_writeback(inode);
+
 	InodeCount--;
 
 	if (inode->i_private) {
