From 41cffedc07d938ed655a95ef0309d79f203d8add Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 23 Sep 2003 09:43:45 -0700 Subject: [PATCH] Hugetlb FS quota accounting problem From: "Chen, Kenneth W" We found a problem in hugetlbfs file system quota when using huge page via mmap. The mmap method in hugetlbfs_file_operation always takes quota for every mmap even for pages that are already allocated on that inode. This results in taxing the same hugepage multiple times and causing mmap to fail on existing file when quota mistakenly runs out. --- include/linux/hugetlb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index edc512ee628f..b3dd00de8dc3 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -98,6 +98,8 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) extern struct file_operations hugetlbfs_file_operations; extern struct vm_operations_struct hugetlb_vm_ops; struct file *hugetlb_zero_setup(size_t); +int hugetlb_get_quota(struct address_space *mapping); +void hugetlb_put_quota(struct address_space *mapping); static inline int is_file_hugepages(struct file *file) { -- cgit v1.2.3