Skip to content

Commit 78689ae

Browse files
Panky-codeskawasaki
authored andcommitted
mm: rename MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO
As all the helper functions has been renamed from *_page to *_folio, rename the MM flag from MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO. No functional changes. Suggested-by: David Hildenbrand <[email protected]> Signed-off-by: Pankaj Raghav <[email protected]> Reviewed-by: Lorenzo Stoakes <[email protected]> Acked-by: David Hildenbrand <[email protected]> Reviewed-by: Zi Yan <[email protected]>
1 parent 5459941 commit 78689ae

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

include/linux/mm_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ enum {
17581758
#define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */
17591759
#define MMF_OOM_SKIP 21 /* mm is of no interest for the OOM killer */
17601760
#define MMF_UNSTABLE 22 /* mm is unstable for copy_from_user */
1761-
#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */
1761+
#define MMF_HUGE_ZERO_FOLIO 23 /* mm has ever used the global huge zero folio */
17621762
#define MMF_DISABLE_THP 24 /* disable THP for all VMAs */
17631763
#define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP)
17641764
#define MMF_OOM_REAP_QUEUED 25 /* mm was queued for oom_reaper */

mm/huge_memory.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,21 +248,21 @@ static void put_huge_zero_folio(void)
248248

249249
struct folio *mm_get_huge_zero_folio(struct mm_struct *mm)
250250
{
251-
if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags))
251+
if (test_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags))
252252
return READ_ONCE(huge_zero_folio);
253253

254254
if (!get_huge_zero_folio())
255255
return NULL;
256256

257-
if (test_and_set_bit(MMF_HUGE_ZERO_PAGE, &mm->flags))
257+
if (test_and_set_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags))
258258
put_huge_zero_folio();
259259

260260
return READ_ONCE(huge_zero_folio);
261261
}
262262

263263
void mm_put_huge_zero_folio(struct mm_struct *mm)
264264
{
265-
if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags))
265+
if (test_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags))
266266
put_huge_zero_folio();
267267
}
268268

0 commit comments

Comments
 (0)