Commit 7128cf9a authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Linus Torvalds

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: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarChao Yu <yuchao0@huawei.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Link: http://lkml.kernel.org/r/20200517214718.468-6-guoqing.jiang@cloud.ionos.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 45dcfc27
...@@ -3051,19 +3051,12 @@ static inline void f2fs_set_page_private(struct page *page, ...@@ -3051,19 +3051,12 @@ static inline void f2fs_set_page_private(struct page *page,
if (PagePrivate(page)) if (PagePrivate(page))
return; return;
get_page(page); attach_page_private(page, (void *)data);
SetPagePrivate(page);
set_page_private(page, data);
} }
static inline void f2fs_clear_page_private(struct page *page) static inline void f2fs_clear_page_private(struct page *page)
{ {
if (!PagePrivate(page)) detach_page_private(page);
return;
set_page_private(page, 0);
ClearPagePrivate(page);
f2fs_put_page(page, 0);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment