aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2006-03-22 03:09:19 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 10:54:07 -0500
commitd6aafa65354cd2dbb089ab9e7dc618f22230fe32 (patch)
treeb274daf127ac8500229754d9841c8af1547bd66f /security
parent253a8b1db1af146d3a7eef0f3626781df12c7141 (diff)
[PATCH] selinuxfs cleanups: sel_make_avc_files
Fix copy & paste error in sel_make_avc_files(), removing a supurious call to d_genocide() in the error path. All of this will be cleaned up by kill_litter_super(). Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/selinuxfs.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index ab7c9935c29a..f321c0c49f46 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1151,22 +1151,19 @@ static int sel_make_avc_files(struct dentry *dir)
1151 dentry = d_alloc_name(dir, files[i].name); 1151 dentry = d_alloc_name(dir, files[i].name);
1152 if (!dentry) { 1152 if (!dentry) {
1153 ret = -ENOMEM; 1153 ret = -ENOMEM;
1154 goto err; 1154 goto out;
1155 } 1155 }
1156 1156
1157 inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode); 1157 inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode);
1158 if (!inode) { 1158 if (!inode) {
1159 ret = -ENOMEM; 1159 ret = -ENOMEM;
1160 goto err; 1160 goto out;
1161 } 1161 }
1162 inode->i_fop = files[i].ops; 1162 inode->i_fop = files[i].ops;
1163 d_add(dentry, inode); 1163 d_add(dentry, inode);
1164 } 1164 }
1165out: 1165out:
1166 return ret; 1166 return ret;
1167err:
1168 d_genocide(dir);
1169 goto out;
1170} 1167}
1171 1168
1172static int sel_make_dir(struct super_block *sb, struct dentry *dentry) 1169static int sel_make_dir(struct super_block *sb, struct dentry *dentry)