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

Commit 23cd573b authored by Zhang Zhen's avatar Zhang Zhen Committed by Yan, Zheng
Browse files

ceph: refactor readpage_nounlock() to make the logic clearer



If the return value of ceph_osdc_readpages() is not negative,
it is certainly greater than or equal to zero.

Remove the useless condition judgment and redundant braces.

Signed-off-by: default avatarZhang Zhen <zhenzhang.zhang@huawei.com>
Reviewed-by: default avatarYan, Zheng <zheng.z.yan@intel.com>
parent ca665e02
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -211,17 +211,14 @@ static int readpage_nounlock(struct file *filp, struct page *page)
		SetPageError(page);
		ceph_fscache_readpage_cancel(inode, page);
		goto out;
	} else {
		if (err < PAGE_CACHE_SIZE) {
	}
	if (err < PAGE_CACHE_SIZE)
		/* zero fill remainder of page */
		zero_user_segment(page, err, PAGE_CACHE_SIZE);
		} else {
	else
		flush_dcache_page(page);
		}
	}
	SetPageUptodate(page);

	if (err >= 0)
	SetPageUptodate(page);
	ceph_readpage_to_fscache(inode, page);

out: