diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-31 00:57:05 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-31 00:57:05 -0400 |
commit | 5bc65793cbf8da0d35f19ef025dda22887e79e80 (patch) | |
tree | 8291998abd73055de6f487fafa174ee2a5d3afee /include/linux/mm.h | |
parent | 6edae708bf77e012d855a7e2c7766f211d234f4f (diff) | |
parent | 3f0a6766e0cc5a577805732e5adb50a585c58175 (diff) |
[SCSI] Merge up to linux-2.6 head
Conflicts:
drivers/scsi/jazz_esp.c
Same changes made by both SCSI and SPARC trees: problem with UTF-8
conversion in the copyright.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 11 |
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 | ||
21 | struct mempolicy; | 20 | struct mempolicy; |
22 | struct anon_vma; | 21 | struct anon_vma; |
22 | struct 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 */ |
25 | extern unsigned long max_mapnr; | 25 | extern 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 | ||
720 | static inline int can_do_mlock(void) | 720 | extern 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 | } | ||
728 | extern int user_shm_lock(size_t, struct user_struct *); | 721 | extern int user_shm_lock(size_t, struct user_struct *); |
729 | extern void user_shm_unlock(size_t, struct user_struct *); | 722 | extern void user_shm_unlock(size_t, struct user_struct *); |
730 | 723 | ||