diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-08-18 15:17:52 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-08-18 15:17:52 +0200 |
commit | e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5 (patch) | |
tree | 37c20ec03e70dc7b5df1d02f16b6ac38d8ed1364 /fs/ecryptfs/super.c | |
parent | 7ac03db84baa204d7d280401ed65842541ed1078 (diff) | |
parent | 56385a12d9bb9e173751f74b6c430742018cafc0 (diff) | |
download | linux-stable-e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5.tar.gz linux-stable-e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5.tar.bz2 linux-stable-e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5.zip |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'fs/ecryptfs/super.c')
-rw-r--r-- | fs/ecryptfs/super.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index 0435886e4a9f..f7fc286a3aa9 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c @@ -118,11 +118,15 @@ void ecryptfs_init_inode(struct inode *inode, struct inode *lower_inode) */ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf) { - return vfs_statfs(ecryptfs_dentry_to_lower(dentry), buf); + struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); + + if (!lower_dentry->d_sb->s_op->statfs) + return -ENOSYS; + return lower_dentry->d_sb->s_op->statfs(lower_dentry, buf); } /** - * ecryptfs_clear_inode + * ecryptfs_evict_inode * @inode - The ecryptfs inode * * Called by iput() when the inode reference count reached zero @@ -131,8 +135,10 @@ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf) * on the inode free list. We use this to drop out reference to the * lower inode. */ -static void ecryptfs_clear_inode(struct inode *inode) +static void ecryptfs_evict_inode(struct inode *inode) { + truncate_inode_pages(&inode->i_data, 0); + end_writeback(inode); iput(ecryptfs_inode_to_lower(inode)); } @@ -184,6 +190,6 @@ const struct super_operations ecryptfs_sops = { .drop_inode = generic_delete_inode, .statfs = ecryptfs_statfs, .remount_fs = NULL, - .clear_inode = ecryptfs_clear_inode, + .evict_inode = ecryptfs_evict_inode, .show_options = ecryptfs_show_options }; |