Skip to content

Commit

Permalink
[PATCH] selinuxfs cleanups: sel_make_avc_files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Morris authored and Linus Torvalds committed Mar 22, 2006
1 parent 253a8b1 commit d6aafa6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions security/selinux/selinuxfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,22 +1151,19 @@ static int sel_make_avc_files(struct dentry *dir)
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)
Expand Down

0 comments on commit d6aafa6

Please sign in to comment.