From: Guoqing Jiang Date: Tue, 2 Jun 2020 04:47:51 +0000 (-0700) Subject: f2fs: use attach/detach_page_private X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7128cf9a25096a75139ec5dcd710ede182657210;p=linux.git f2fs: use attach/detach_page_private Since the new pair function is introduced, we can call them to clean the code in f2fs.h. Signed-off-by: Guoqing Jiang Signed-off-by: Andrew Morton Acked-by: Chao Yu Cc: Jaegeuk Kim Link: http://lkml.kernel.org/r/20200517214718.468-6-guoqing.jiang@cloud.ionos.com Signed-off-by: Linus Torvalds --- diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index b5a5da74c0133..5c0149d2f46a4 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3051,19 +3051,12 @@ static inline void f2fs_set_page_private(struct page *page, if (PagePrivate(page)) return; - get_page(page); - SetPagePrivate(page); - set_page_private(page, data); + attach_page_private(page, (void *)data); } static inline void f2fs_clear_page_private(struct page *page) { - if (!PagePrivate(page)) - return; - - set_page_private(page, 0); - ClearPagePrivate(page); - f2fs_put_page(page, 0); + detach_page_private(page); } /*