diff options
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) |