diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2012-02-12 22:58:52 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-02-13 18:45:39 -0500 |
commit | 191c542442fdf53cc3c496c00be13367fd9cd42d (patch) | |
tree | 4aef9e33a1d99e6530b704243efbe373bb314d61 /mm/shmem.c | |
parent | bbd36568594d091e682a1975ef4ee41d808de0bc (diff) |
mm: collapse security_vm_enough_memory() variants into a single function
Collapse security_vm_enough_memory() variants into a single function.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 269d049294ab..d9c293952755 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -127,7 +127,7 @@ static inline struct shmem_sb_info *SHMEM_SB(struct super_block *sb) | |||
127 | static inline int shmem_acct_size(unsigned long flags, loff_t size) | 127 | static inline int shmem_acct_size(unsigned long flags, loff_t size) |
128 | { | 128 | { |
129 | return (flags & VM_NORESERVE) ? | 129 | return (flags & VM_NORESERVE) ? |
130 | 0 : security_vm_enough_memory_kern(VM_ACCT(size)); | 130 | 0 : security_vm_enough_memory_mm(current->mm, VM_ACCT(size)); |
131 | } | 131 | } |
132 | 132 | ||
133 | static inline void shmem_unacct_size(unsigned long flags, loff_t size) | 133 | static inline void shmem_unacct_size(unsigned long flags, loff_t size) |
@@ -145,7 +145,7 @@ static inline void shmem_unacct_size(unsigned long flags, loff_t size) | |||
145 | static inline int shmem_acct_block(unsigned long flags) | 145 | static inline int shmem_acct_block(unsigned long flags) |
146 | { | 146 | { |
147 | return (flags & VM_NORESERVE) ? | 147 | return (flags & VM_NORESERVE) ? |
148 | security_vm_enough_memory_kern(VM_ACCT(PAGE_CACHE_SIZE)) : 0; | 148 | security_vm_enough_memory_mm(current->mm, VM_ACCT(PAGE_CACHE_SIZE)) : 0; |
149 | } | 149 | } |
150 | 150 | ||
151 | static inline void shmem_unacct_blocks(unsigned long flags, long pages) | 151 | static inline void shmem_unacct_blocks(unsigned long flags, long pages) |