[PATCH 5/5] selinuxfs cleanups - sel_make_avc_files

From: James Morris
Date: Wed Feb 22 2006 - 09:54:43 EST


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().

Please apply.


Signed-off-by: James Morris <jmorris@xxxxxxxxx>
Acked-by: Stephen Smalley <sds@xxxxxxxxxxxxx>


---

security/selinux/selinuxfs.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff -purN -X dontdiff linux-2.6.16-rc4.p/security/selinux/selinuxfs.c linux-2.6.16-rc4.w/security/selinux/selinuxfs.c
--- linux-2.6.16-rc4.p/security/selinux/selinuxfs.c 2006-02-21 20:34:04.000000000 -0500
+++ linux-2.6.16-rc4.w/security/selinux/selinuxfs.c 2006-02-21 20:34:40.000000000 -0500
@@ -1168,22 +1168,19 @@ static int sel_make_avc_files(struct den
dentry = d_alloc_name(dir, files[i].name);
if (!dentry) {
ret = -ENOMEM;
- goto err;
+ goto out;
}

inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode);
if (!inode) {
ret = -ENOMEM;
- goto err;
+ goto out;
}
inode->i_fop = files[i].ops;
d_add(dentry, inode);
}
out:
return ret;
-err:
- d_genocide(dir);
- goto out;
}

static int sel_make_dir(struct super_block *sb, struct dentry *dentry)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/