X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fshm.h;h=eeaed921a1dc02d02f3a61cec5ea0c62873ecfad;hb=c4ec20717313daafba59225f812db89595952b83;hp=a2c896ad0befa6819dbae3e1ffd47b1679597346;hpb=0ad3a96f8ad910ecf87a25ec69ed360b284dee2e;p=linux-2.6 diff --git a/include/linux/shm.h b/include/linux/shm.h index a2c896ad0b..eeaed921a1 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h @@ -16,7 +16,9 @@ #define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */ #define SHMSEG SHMMNI /* max shared segs per process */ +#ifdef __KERNEL__ #include +#endif /* Obsolete, used only for backwards compatibility and libc5 compiles */ struct shmid_ds { @@ -77,7 +79,6 @@ struct shmid_kernel /* private to the kernel */ { struct kern_ipc_perm shm_perm; struct file * shm_file; - int id; unsigned long shm_nattch; unsigned long shm_segsz; time_t shm_atim; @@ -96,12 +97,17 @@ struct shmid_kernel /* private to the kernel */ #ifdef CONFIG_SYSVIPC long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr); +extern int is_file_shm_hugepages(struct file *file); #else static inline long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr) { return -ENOSYS; } +static inline int is_file_shm_hugepages(struct file *file) +{ + return 0; +} #endif #endif /* __KERNEL__ */