Skip to content

Commit 6974b21

Browse files
Matthew Wilcox (Oracle)Jaegeuk Kim
authored andcommitted
f2fs: Remove clear_page_private_all()
All callers can simply call folio_detach_private(). This was the only way that clear_page_private_data() could be called, so remove that too. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 0f54eec commit 6974b21

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

fs/f2fs/data.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3736,7 +3736,7 @@ void f2fs_invalidate_folio(struct folio *folio, size_t offset, size_t length)
37363736
f2fs_remove_dirty_inode(inode);
37373737
}
37383738
}
3739-
clear_page_private_all(&folio->page);
3739+
folio_detach_private(folio);
37403740
}
37413741

37423742
bool f2fs_release_folio(struct folio *folio, gfp_t wait)
@@ -3745,7 +3745,7 @@ bool f2fs_release_folio(struct folio *folio, gfp_t wait)
37453745
if (folio_test_dirty(folio))
37463746
return false;
37473747

3748-
clear_page_private_all(&folio->page);
3748+
folio_detach_private(folio);
37493749
return true;
37503750
}
37513751

fs/f2fs/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct folio *folio,
897897
f2fs_clear_page_cache_dirty_tag(folio);
898898
folio_clear_dirty_for_io(folio);
899899
folio_clear_uptodate(folio);
900-
clear_page_private_all(&folio->page);
900+
folio_detach_private(folio);
901901

902902
inode_dec_dirty_pages(dir);
903903
f2fs_remove_dirty_inode(dir);

fs/f2fs/f2fs.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,24 +2547,6 @@ static inline void folio_set_f2fs_data(struct folio *folio, unsigned long data)
25472547
folio->private = (void *)((unsigned long)folio->private | data);
25482548
}
25492549

2550-
static inline void clear_page_private_data(struct page *page)
2551-
{
2552-
page_private(page) &= GENMASK(PAGE_PRIVATE_MAX - 1, 0);
2553-
if (page_private(page) == BIT(PAGE_PRIVATE_NOT_POINTER))
2554-
detach_page_private(page);
2555-
}
2556-
2557-
static inline void clear_page_private_all(struct page *page)
2558-
{
2559-
clear_page_private_data(page);
2560-
clear_page_private_reference(page);
2561-
clear_page_private_gcing(page);
2562-
clear_page_private_inline(page);
2563-
clear_page_private_atomic(page);
2564-
2565-
f2fs_bug_on(F2FS_P_SB(page), page_private(page));
2566-
}
2567-
25682550
static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
25692551
struct inode *inode,
25702552
block_t count)

0 commit comments

Comments
 (0)