aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 4670ebd1f622..e4183c6c7de3 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1,7 +1,6 @@
1#ifndef _LINUX_MM_H 1#ifndef _LINUX_MM_H
2#define _LINUX_MM_H 2#define _LINUX_MM_H
3 3
4#include <linux/sched.h>
5#include <linux/errno.h> 4#include <linux/errno.h>
6#include <linux/capability.h> 5#include <linux/capability.h>
7 6
@@ -20,6 +19,7 @@
20 19
21struct mempolicy; 20struct mempolicy;
22struct anon_vma; 21struct anon_vma;
22struct user_struct;
23 23
24#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ 24#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
25extern unsigned long max_mapnr; 25extern unsigned long max_mapnr;
@@ -717,14 +717,7 @@ extern unsigned long shmem_get_unmapped_area(struct file *file,
717 unsigned long flags); 717 unsigned long flags);
718#endif 718#endif
719 719
720static inline int can_do_mlock(void) 720extern int can_do_mlock(void);
721{
722 if (capable(CAP_IPC_LOCK))
723 return 1;
724 if (current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur != 0)
725 return 1;
726 return 0;
727}
728extern int user_shm_lock(size_t, struct user_struct *); 721extern int user_shm_lock(size_t, struct user_struct *);
729extern void user_shm_unlock(size_t, struct user_struct *); 722extern void user_shm_unlock(size_t, struct user_struct *);
730 723