summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-07-17 15:41:46 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2018-08-01 21:52:36 +0300
commit80551d1773801d5ebe71803cd8c469b8337992e0 (patch)
treee28863a5cef3ea926073156dab9b9f624407447e /fs/f2fs
parent6122003a1a612a315c719c6418a527442684903d (diff)
downloadlinux-80551d1773801d5ebe71803cd8c469b8337992e0.tar.xz
f2fs: clean up with get_current_nat_page
Just cleanup, no logic change. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/node.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 69d0ac1b6cac..9d9f4c9750c4 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -112,25 +112,22 @@ static void clear_node_page_dirty(struct page *page)
static struct page *get_current_nat_page(struct f2fs_sb_info *sbi, nid_t nid)
{
- pgoff_t index = current_nat_addr(sbi, nid);
- return f2fs_get_meta_page_nofail(sbi, index);
+ return f2fs_get_meta_page_nofail(sbi, current_nat_addr(sbi, nid));
}
static struct page *get_next_nat_page(struct f2fs_sb_info *sbi, nid_t nid)
{
struct page *src_page;
struct page *dst_page;
- pgoff_t src_off;
pgoff_t dst_off;
void *src_addr;
void *dst_addr;
struct f2fs_nm_info *nm_i = NM_I(sbi);
- src_off = current_nat_addr(sbi, nid);
- dst_off = next_nat_addr(sbi, src_off);
+ dst_off = next_nat_addr(sbi, current_nat_addr(sbi, nid));
/* get current nat block page with lock */
- src_page = f2fs_get_meta_page(sbi, src_off);
+ src_page = get_current_nat_page(sbi, nid);
dst_page = f2fs_grab_meta_page(sbi, dst_off);
f2fs_bug_on(sbi, PageDirty(src_page));