X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=include%2Flinux%2Fmm.h;h=e4183c6c7de3dca209ed8f99eb852719e3f31bfb;hb=e8edc6e03a5c8562dc70a6d969f732bdb355a7e7;hp=4670ebd1f6229222bbd6df7343362b14f661603e;hpb=a9deecba19b8f384d97f82c75379da48bccb2588;p=deliverable%2Flinux.git 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 @@ #ifndef _LINUX_MM_H #define _LINUX_MM_H -#include #include #include @@ -20,6 +19,7 @@ struct mempolicy; struct anon_vma; +struct user_struct; #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ extern unsigned long max_mapnr; @@ -717,14 +717,7 @@ extern unsigned long shmem_get_unmapped_area(struct file *file, unsigned long flags); #endif -static inline int can_do_mlock(void) -{ - if (capable(CAP_IPC_LOCK)) - return 1; - if (current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur != 0) - return 1; - return 0; -} +extern int can_do_mlock(void); extern int user_shm_lock(size_t, struct user_struct *); extern void user_shm_unlock(size_t, struct user_struct *);