Skip to content

Commit 89ecf38

Browse files
NTFS: Mask out __GFP_HIGHMEM when doing kmalloc() in __ntfs_malloc() as it
otherwise causes a BUG(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
1 parent 5d46770 commit 89ecf38

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

‎fs/ntfs/ChangeLog‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ ToDo/Notes:
3434
journals with two different restart pages. We sanity check both and
3535
either use the only sane one or the more recent one of the two in the
3636
case that both are valid.
37-
- Modify fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() based
38-
allocations with __GFP_HIGHMEM, analogous to how the vmalloc() based
39-
allocations are done.
4037
- Add fs/ntfs/malloc.h::ntfs_malloc_nofs_nofail() which is analogous to
4138
ntfs_malloc_nofs() but it performs allocations with __GFP_NOFAIL and
4239
hence cannot fail.

‎fs/ntfs/malloc.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static inline void *__ntfs_malloc(unsigned long size,
4545
if (likely(size <= PAGE_SIZE)) {
4646
BUG_ON(!size);
4747
/* kmalloc() has per-CPU caches so is faster for now. */
48-
return kmalloc(PAGE_SIZE, gfp_mask);
48+
return kmalloc(PAGE_SIZE, gfp_mask & ~__GFP_HIGHMEM);
4949
/* return (void *)__get_free_page(gfp_mask); */
5050
}
5151
if (likely(size >> PAGE_SHIFT < num_physpages))

0 commit comments

Comments
 (0)