From: Chao Yu Date: Thu, 2 Nov 2017 12:41:02 +0000 (+0800) Subject: f2fs: remove dead code in update_meta_page X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff95a94dd04cca4b2d5dbeeaaaf1d88b8b4ff1c2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git f2fs: remove dead code in update_meta_page After commit a468f0ef516f ("f2fs: use crc and cp version to determine roll-forward recovery"), last caller of update_meta_page passing @src with NULL is gone, so remove related dead code there. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 79efe3e71c93..5789d2e622ac 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1991,12 +1991,8 @@ struct page *get_sum_page(struct f2fs_sb_info *sbi, unsigned int segno) void update_meta_page(struct f2fs_sb_info *sbi, void *src, block_t blk_addr) { struct page *page = grab_meta_page(sbi, blk_addr); - void *dst = page_address(page); - if (src) - memcpy(dst, src, PAGE_SIZE); - else - memset(dst, 0, PAGE_SIZE); + memcpy(page_address(page), src, PAGE_SIZE); set_page_dirty(page); f2fs_put_page(page, 1); }