diff options
Diffstat (limited to 'fs/ecryptfs/super.c')
-rw-r--r-- | fs/ecryptfs/super.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index 9df7fd6e0c39..cf152823bbf4 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
31 | #include <linux/file.h> | 31 | #include <linux/file.h> |
32 | #include <linux/crypto.h> | 32 | #include <linux/crypto.h> |
33 | #include <linux/statfs.h> | ||
34 | #include <linux/magic.h> | ||
33 | #include "ecryptfs_kernel.h" | 35 | #include "ecryptfs_kernel.h" |
34 | 36 | ||
35 | struct kmem_cache *ecryptfs_inode_info_cache; | 37 | struct kmem_cache *ecryptfs_inode_info_cache; |
@@ -102,10 +104,20 @@ static void ecryptfs_destroy_inode(struct inode *inode) | |||
102 | static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf) | 104 | static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf) |
103 | { | 105 | { |
104 | struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); | 106 | struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); |
107 | int rc; | ||
105 | 108 | ||
106 | if (!lower_dentry->d_sb->s_op->statfs) | 109 | if (!lower_dentry->d_sb->s_op->statfs) |
107 | return -ENOSYS; | 110 | return -ENOSYS; |
108 | return lower_dentry->d_sb->s_op->statfs(lower_dentry, buf); | 111 | |
112 | rc = lower_dentry->d_sb->s_op->statfs(lower_dentry, buf); | ||
113 | if (rc) | ||
114 | return rc; | ||
115 | |||
116 | buf->f_type = ECRYPTFS_SUPER_MAGIC; | ||
117 | rc = ecryptfs_set_f_namelen(&buf->f_namelen, buf->f_namelen, | ||
118 | &ecryptfs_superblock_to_private(dentry->d_sb)->mount_crypt_stat); | ||
119 | |||
120 | return rc; | ||
109 | } | 121 | } |
110 | 122 | ||
111 | /** | 123 | /** |