提交 7128cf9a 编写于 作者: G Guoqing Jiang 提交者: 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: NGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Acked-by: NChao 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: NLinus Torvalds <torvalds@linux-foundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册