mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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 <guoqing.jiang@cloud.ionos.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Chao Yu <yuchao0@huawei.com> Cc: Jaegeuk Kim <jaegeuk@kernel.org> Link: http://lkml.kernel.org/r/20200517214718.468-6-guoqing.jiang@cloud.ionos.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
45dcfc2732
commit
7128cf9a25
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user