From: Jaegeuk Kim <jaegeuk@kernel.org>
Date: Wed, 6 Apr 2016 18:27:03 +0000 (-0700)
Subject: f2fs: remove redundant condition check
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4da7bf5a4345f3ce9699476a8022f66cfb4a8ce9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

f2fs: remove redundant condition check

This patch resolves the redundant condition check reported by David.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 0955312e5ca0..b92782f40643 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -211,7 +211,7 @@ void ra_meta_pages_cond(struct f2fs_sb_info *sbi, pgoff_t index)
 	bool readahead = false;
 
 	page = find_get_page(META_MAPPING(sbi), index);
-	if (!page || (page && !PageUptodate(page)))
+	if (!page || !PageUptodate(page))
 		readahead = true;
 	f2fs_put_page(page, 0);
 
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 5dafb9cef12e..c29bcf4cfca1 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1496,7 +1496,7 @@ restart:
 		} else {
 			/* hole case */
 			err = get_dnode_of_data(&dn, index, LOOKUP_NODE);
-			if (err || (!err && dn.data_blkaddr == NULL_ADDR)) {
+			if (err || dn.data_blkaddr == NULL_ADDR) {
 				f2fs_put_dnode(&dn);
 				f2fs_lock_op(sbi);
 				locked = true;