Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 031fa8cc authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: remove unnecessary condition checks



This patch removes the unnecessary condition checks on:

fs/f2fs/gc.c:667 do_garbage_collect() warn: 'sum_page' isn't an ERR_PTR
fs/f2fs/f2fs.h:795 f2fs_put_page() warn: 'page' isn't an ERR_PTR

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent f9a4e6df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -792,7 +792,7 @@ static inline unsigned int valid_inode_count(struct f2fs_sb_info *sbi)

static inline void f2fs_put_page(struct page *page, int unlock)
{
	if (!page || IS_ERR(page))
	if (!page)
		return;

	if (unlock) {
+0 −2
Original line number Diff line number Diff line
@@ -664,8 +664,6 @@ static void do_garbage_collect(struct f2fs_sb_info *sbi, unsigned int segno,

	/* read segment summary of victim */
	sum_page = get_sum_page(sbi, segno);
	if (IS_ERR(sum_page))
		return;

	blk_start_plug(&plug);