Commit 18302805 authored by Li Wang's avatar Li Wang Committed by Ilya Dryomov

ceph fscache: Uncaching no data page from fscache in readpage()

Currently, if one new page allocated into fscache in readpage(), however,
with no data read into due to error encountered during reading from OSDs,
the slot in fscache is not uncached. This patch fixes this.
Signed-off-by: default avatarLi Wang <liwang@ubuntukylin.com>
Reviewed-by: default avatarMilosz Tanski <milosz@adfin.com>
parent 3f42bc4b
......@@ -209,6 +209,7 @@ static int readpage_nounlock(struct file *filp, struct page *page)
err = 0;
if (err < 0) {
SetPageError(page);
ceph_fscache_readpage_cancel(inode, page);
goto out;
} else {
if (err < PAGE_CACHE_SIZE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment