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 /security/security.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 'security/security.c')
-rw-r--r-- | security/security.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/security/security.c b/security/security.c index 7d9426bb7442..44177add4713 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -187,25 +187,11 @@ int security_settime(const struct timespec *ts, const struct timezone *tz) | |||
187 | return security_ops->settime(ts, tz); | 187 | return security_ops->settime(ts, tz); |
188 | } | 188 | } |
189 | 189 | ||
190 | int security_vm_enough_memory(long pages) | ||
191 | { | ||
192 | WARN_ON(current->mm == NULL); | ||
193 | return security_ops->vm_enough_memory(current->mm, pages); | ||
194 | } | ||
195 | |||
196 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) | 190 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) |
197 | { | 191 | { |
198 | WARN_ON(mm == NULL); | ||
199 | return security_ops->vm_enough_memory(mm, pages); | 192 | return security_ops->vm_enough_memory(mm, pages); |
200 | } | 193 | } |
201 | 194 | ||
202 | int security_vm_enough_memory_kern(long pages) | ||
203 | { | ||
204 | /* If current->mm is a kernel thread then we will pass NULL, | ||
205 | for this specific case that is fine */ | ||
206 | return security_ops->vm_enough_memory(current->mm, pages); | ||
207 | } | ||
208 | |||
209 | int security_bprm_set_creds(struct linux_binprm *bprm) | 195 | int security_bprm_set_creds(struct linux_binprm *bprm) |
210 | { | 196 | { |
211 | return security_ops->bprm_set_creds(bprm); | 197 | return security_ops->bprm_set_creds(bprm); |