f2fs: remove redundant condition check
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 6 Apr 2016 18:27:03 +0000 (11:27 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 15 Apr 2016 15:49:47 +0000 (08:49 -0700)
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>
fs/f2fs/checkpoint.c
fs/f2fs/data.c

index 0955312e5ca042fe45f88e0c10714d79f3fb8778..b92782f406434bf4d344d1767a77902ad08376ef 100644 (file)
@@ -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);
 
index 5dafb9cef12e7116c545a07cbac5abc16cb76715..c29bcf4cfca139b68e83eaa35253cd562c5ba63c 100644 (file)
@@ -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;