Untangling ima mess, part 1: alloc_file()

There are 2 groups of alloc_file() callers:
	* ones that are followed by ima_counts_get
	* ones giving non-regular files
So let's pull that ima_counts_get() into alloc_file();
it's a no-op in case of non-regular files.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2009-12-16 04:53:03 -05:00
parent 7715b52122
commit 0552f879d4
4 changed files with 2 additions and 6 deletions

View file

@ -30,7 +30,6 @@
#include <linux/dnotify.h>
#include <linux/statfs.h>
#include <linux/security.h>
#include <linux/ima.h>
#include <linux/magic.h>
#include <asm/uaccess.h>
@ -971,7 +970,6 @@ struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag,
&hugetlbfs_file_operations);
if (!file)
goto out_dentry; /* inode is already attached */
ima_counts_get(file);
return file;