Signed-off-by: Andrew Morton --- 25-akpm/fs/hugetlbfs/inode.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff -puN fs/hugetlbfs/inode.c~hugetlb_shm_group-sysctl-gid-0-fix fs/hugetlbfs/inode.c --- 25/fs/hugetlbfs/inode.c~hugetlb_shm_group-sysctl-gid-0-fix 2004-06-28 20:25:48.526051384 -0700 +++ 25-akpm/fs/hugetlbfs/inode.c 2004-06-28 20:25:48.530050776 -0700 @@ -719,8 +719,11 @@ static unsigned long hugetlbfs_counter(v static int can_do_hugetlb_shm(void) { - return likely(capable(CAP_IPC_LOCK) || - in_group_p(sysctl_hugetlb_shm_group)); + if (capable(CAP_IPC_LOCK)) + return 1; + if (sysctl_hugetlb_shm_group == 0) + return 0; + return in_group_p(sysctl_hugetlb_shm_group); } struct file *hugetlb_zero_setup(size_t size) _