X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=security%2Fselinux%2Fselinuxfs.c;h=ddc39ffee3b798f9644c3d15aef636d587567317;hb=352771d8dfacc828fdee58d5def490d5fb480c83;hp=8f12c7988476b75cccd4508ee5a8d8df4fe8b072;hpb=8acd6bd4f7d04a05c364bea1883ca3876efde353;p=linux-2.6.git diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 8f12c7988..ddc39ffee 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -822,7 +822,6 @@ static int sel_make_bools(void) struct dentry *dir = bool_dir; struct inode *inode = NULL; struct inode_security_struct *isec; - struct qstr qname; char **names = NULL, *page; int num; int *values = NULL; @@ -842,10 +841,7 @@ static int sel_make_bools(void) goto out; for (i = 0; i < num; i++) { - qname.name = names[i]; - qname.len = strlen(qname.name); - qname.hash = full_name_hash(qname.name, qname.len); - dentry = d_alloc(dir, &qname); + dentry = d_alloc_name(dir, names[i]); if (!dentry) { ret = -ENOMEM; goto err; @@ -1118,7 +1114,6 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent) int ret; struct dentry *dentry; struct inode *inode; - struct qstr qname; struct inode_security_struct *isec; static struct tree_descr selinux_files[] = { @@ -1139,10 +1134,7 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent) if (ret) return ret; - qname.name = BOOL_DIR_NAME; - qname.len = strlen(qname.name); - qname.hash = full_name_hash(qname.name, qname.len); - dentry = d_alloc(sb->s_root, &qname); + dentry = d_alloc_name(sb->s_root, BOOL_DIR_NAME); if (!dentry) return -ENOMEM; @@ -1157,10 +1149,7 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent) if (ret) goto out; - qname.name = NULL_FILE_NAME; - qname.len = strlen(qname.name); - qname.hash = full_name_hash(qname.name, qname.len); - dentry = d_alloc(sb->s_root, &qname); + dentry = d_alloc_name(sb->s_root, NULL_FILE_NAME); if (!dentry) return -ENOMEM;