Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tmpfs: restore missing clear_highpage

tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in
which shmem_getpage receives the page from its caller instead of allocating.
We must cover this case by clear_highpage before SetPageUptodate, as before.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Hugh Dickins and committed by
Linus Torvalds
e84e2e13 9bfb52ad

+3 -2
+3 -2
mm/shmem.c
··· 1072 1072 pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx); 1073 1073 pvma.vm_pgoff = idx; 1074 1074 pvma.vm_end = PAGE_SIZE; 1075 - page = alloc_page_vma(gfp | __GFP_ZERO, &pvma, 0); 1075 + page = alloc_page_vma(gfp, &pvma, 0); 1076 1076 mpol_free(pvma.vm_policy); 1077 1077 return page; 1078 1078 } ··· 1093 1093 static inline struct page * 1094 1094 shmem_alloc_page(gfp_t gfp,struct shmem_inode_info *info, unsigned long idx) 1095 1095 { 1096 - return alloc_page(gfp | __GFP_ZERO); 1096 + return alloc_page(gfp); 1097 1097 } 1098 1098 #endif 1099 1099 ··· 1306 1306 1307 1307 info->alloced++; 1308 1308 spin_unlock(&info->lock); 1309 + clear_highpage(filepage); 1309 1310 flush_dcache_page(filepage); 1310 1311 SetPageUptodate(filepage); 1311 1312 }