From 78cecf3cfd2ff372d64ce5e33db2554823b2526b Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Tue, 10 Aug 2010 23:50:14 -0400 Subject: [PATCH] Wrapfs: new vfs_statfs and ->evict_inode prototypes Signed-off-by: Erez Zadok --- fs/wrapfs/super.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/wrapfs/super.c b/fs/wrapfs/super.c index 9a6e8869f0eb..e729ff6ea08b 100644 --- a/fs/wrapfs/super.c +++ b/fs/wrapfs/super.c @@ -42,7 +42,7 @@ static int wrapfs_statfs(struct dentry *dentry, struct kstatfs *buf) struct path lower_path; wrapfs_get_lower_path(dentry, &lower_path); - err = vfs_statfs(lower_path.dentry, buf); + err = vfs_statfs(&lower_path, buf); wrapfs_put_lower_path(dentry, &lower_path); /* set return buf to our f/s to avoid confusing user-level utils */ @@ -79,10 +79,12 @@ static int wrapfs_remount_fs(struct super_block *sb, int *flags, char *options) * that needs to be, before the inode is completely destroyed and put * on the inode free list. */ -static void wrapfs_clear_inode(struct inode *inode) +static void wrapfs_evict_inode(struct inode *inode) { struct inode *lower_inode; + truncate_inode_pages(&inode->i_data, 0); + end_writeback(inode); /* * Decrement a reference to a lower_inode, which was incremented * by our read_inode when it was created initially. @@ -157,7 +159,7 @@ const struct super_operations wrapfs_sops = { .put_super = wrapfs_put_super, .statfs = wrapfs_statfs, .remount_fs = wrapfs_remount_fs, - .clear_inode = wrapfs_clear_inode, + .evict_inode = wrapfs_evict_inode, .umount_begin = wrapfs_umount_begin, .show_options = generic_show_options, .alloc_inode = wrapfs_alloc_inode, -- 2.43.0