mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
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:
parent
7715b52122
commit
0552f879d4
4 changed files with 2 additions and 6 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <linux/fsnotify.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <linux/percpu_counter.h>
|
||||
#include <linux/ima.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
|
||||
|
@ -190,6 +191,7 @@ struct file *alloc_file(struct path *path, fmode_t mode,
|
|||
error = mnt_clone_write(path->mnt);
|
||||
WARN_ON(error);
|
||||
}
|
||||
ima_counts_get(file);
|
||||
return file;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue