Skip to content

Commit

Permalink
f2fs: use attach/detach_page_private
Browse files Browse the repository at this point in the history
Since the new pair function is introduced, we can call them to clean the
code in f2fs.h.

Signed-off-by: Guoqing Jiang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Chao Yu <[email protected]>
Cc: Jaegeuk Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Guoqing Jiang authored and torvalds committed Jun 2, 2020
1 parent 45dcfc2 commit 7128cf9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 7128cf9

Please sign in to comment.