diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-23 01:45:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 01:45:46 -0500 |
commit | 6be325719b3e54624397e413efd4b33a997e55a3 (patch) | |
tree | 57f321a56794cab2222e179b16731e0d76a4a68a /fs/ecryptfs/main.c | |
parent | 26d92f9276a56d55511a427fb70bd70886af647a (diff) | |
parent | 92dcffb916d309aa01778bf8963a6932e4014d07 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'fs/ecryptfs/main.c')
-rw-r--r-- | fs/ecryptfs/main.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index c6ac85d6c701..ea2f92101dfe 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/key.h> | 35 | #include <linux/key.h> |
36 | #include <linux/parser.h> | 36 | #include <linux/parser.h> |
37 | #include <linux/fs_stack.h> | 37 | #include <linux/fs_stack.h> |
38 | #include <linux/ima.h> | ||
39 | #include "ecryptfs_kernel.h" | 38 | #include "ecryptfs_kernel.h" |
40 | 39 | ||
41 | /** | 40 | /** |
@@ -119,7 +118,6 @@ int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry) | |||
119 | const struct cred *cred = current_cred(); | 118 | const struct cred *cred = current_cred(); |
120 | struct ecryptfs_inode_info *inode_info = | 119 | struct ecryptfs_inode_info *inode_info = |
121 | ecryptfs_inode_to_private(ecryptfs_dentry->d_inode); | 120 | ecryptfs_inode_to_private(ecryptfs_dentry->d_inode); |
122 | int opened_lower_file = 0; | ||
123 | int rc = 0; | 121 | int rc = 0; |
124 | 122 | ||
125 | mutex_lock(&inode_info->lower_file_mutex); | 123 | mutex_lock(&inode_info->lower_file_mutex); |
@@ -136,12 +134,9 @@ int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry) | |||
136 | "for lower_dentry [0x%p] and lower_mnt [0x%p]; " | 134 | "for lower_dentry [0x%p] and lower_mnt [0x%p]; " |
137 | "rc = [%d]\n", lower_dentry, lower_mnt, rc); | 135 | "rc = [%d]\n", lower_dentry, lower_mnt, rc); |
138 | inode_info->lower_file = NULL; | 136 | inode_info->lower_file = NULL; |
139 | } else | 137 | } |
140 | opened_lower_file = 1; | ||
141 | } | 138 | } |
142 | mutex_unlock(&inode_info->lower_file_mutex); | 139 | mutex_unlock(&inode_info->lower_file_mutex); |
143 | if (opened_lower_file) | ||
144 | ima_counts_get(inode_info->lower_file); | ||
145 | return rc; | 140 | return rc; |
146 | } | 141 | } |
147 | 142 | ||
@@ -194,7 +189,7 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry, | |||
194 | init_special_inode(inode, lower_inode->i_mode, | 189 | init_special_inode(inode, lower_inode->i_mode, |
195 | lower_inode->i_rdev); | 190 | lower_inode->i_rdev); |
196 | dentry->d_op = &ecryptfs_dops; | 191 | dentry->d_op = &ecryptfs_dops; |
197 | fsstack_copy_attr_all(inode, lower_inode, NULL); | 192 | fsstack_copy_attr_all(inode, lower_inode); |
198 | /* This size will be overwritten for real files w/ headers and | 193 | /* This size will be overwritten for real files w/ headers and |
199 | * other metadata */ | 194 | * other metadata */ |
200 | fsstack_copy_inode_size(inode, lower_inode); | 195 | fsstack_copy_inode_size(inode, lower_inode); |
@@ -590,8 +585,8 @@ out: | |||
590 | * with as much information as it can before needing | 585 | * with as much information as it can before needing |
591 | * the lower filesystem. | 586 | * the lower filesystem. |
592 | * ecryptfs_read_super(): this accesses the lower filesystem and uses | 587 | * ecryptfs_read_super(): this accesses the lower filesystem and uses |
593 | * ecryptfs_interpolate to perform most of the linking | 588 | * ecryptfs_interpose to perform most of the linking |
594 | * ecryptfs_interpolate(): links the lower filesystem into ecryptfs | 589 | * ecryptfs_interpose(): links the lower filesystem into ecryptfs (inode.c) |
595 | */ | 590 | */ |
596 | static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags, | 591 | static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags, |
597 | const char *dev_name, void *raw_data, | 592 | const char *dev_name, void *raw_data, |