diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-09-23 09:43:45 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-09-23 09:43:45 -0700 |
| commit | 41cffedc07d938ed655a95ef0309d79f203d8add (patch) | |
| tree | fb8e4a5e96adc9e0615e7f1824cf1953d2a72f25 /include/linux | |
| parent | 257e2ce7256a7a5a93a79d65e1e64818f940c11a (diff) | |
[PATCH] Hugetlb FS quota accounting problem
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
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.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hugetlb.h | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |
