Skip to content

Commit

Permalink
f2fs: fix to call clear_page_private_reference in .{release,invalid}_…
Browse files Browse the repository at this point in the history
…folio

b763f3b ("f2fs: restructure f2fs page.private layout") missed
to call clear_page_private_reference() in .{release,invalid}_folio,
fix it, though it's not a big deal since folio_detach_private() was
called to clear all privae info and reference count in the page.

BTW, remove page_private_reference() definition as it never be used.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Jan 4, 2023
1 parent b3107b3 commit 6779b5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3698,6 +3698,7 @@ void f2fs_invalidate_folio(struct folio *folio, size_t offset, size_t length)
}
}

clear_page_private_reference(&folio->page);
clear_page_private_gcing(&folio->page);

if (test_opt(sbi, COMPRESS_CACHE) &&
Expand All @@ -3723,6 +3724,7 @@ bool f2fs_release_folio(struct folio *folio, gfp_t wait)
clear_page_private_data(&folio->page);
}

clear_page_private_reference(&folio->page);
clear_page_private_gcing(&folio->page);

folio_detach_private(folio);
Expand Down
1 change: 0 additions & 1 deletion fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,6 @@ static inline void clear_page_private_##name(struct page *page) \
}

PAGE_PRIVATE_GET_FUNC(nonpointer, NOT_POINTER);
PAGE_PRIVATE_GET_FUNC(reference, REF_RESOURCE);
PAGE_PRIVATE_GET_FUNC(inline, INLINE_INODE);
PAGE_PRIVATE_GET_FUNC(gcing, ONGOING_MIGRATION);
PAGE_PRIVATE_GET_FUNC(dummy, DUMMY_WRITE);
Expand Down

0 comments on commit 6779b5d

Please sign in to comment.