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

Commit 4da7bf5a authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: remove redundant condition check



This patch resolves the redundant condition check reported by David.

Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 26dc3d44
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -211,7 +211,7 @@ void ra_meta_pages_cond(struct f2fs_sb_info *sbi, pgoff_t index)
	bool readahead = false;
	bool readahead = false;


	page = find_get_page(META_MAPPING(sbi), index);
	page = find_get_page(META_MAPPING(sbi), index);
	if (!page || (page && !PageUptodate(page)))
	if (!page || !PageUptodate(page))
		readahead = true;
		readahead = true;
	f2fs_put_page(page, 0);
	f2fs_put_page(page, 0);


+1 −1
Original line number Original line Diff line number Diff line
@@ -1496,7 +1496,7 @@ static int prepare_write_begin(struct f2fs_sb_info *sbi,
		} else {
		} else {
			/* hole case */
			/* hole case */
			err = get_dnode_of_data(&dn, index, LOOKUP_NODE);
			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_put_dnode(&dn);
				f2fs_lock_op(sbi);
				f2fs_lock_op(sbi);
				locked = true;
				locked = true;