Commit 17e38d92 authored by Li Wang's avatar Li Wang Committed by Greg Kroah-Hartman

ceph: allocate non-zero page to fscache in readpage()

commit ff638b7d upstream.

ceph_osdc_readpages() returns number of bytes read, currently,
the code only allocate full-zero page into fscache, this patch
fixes this.
Signed-off-by: default avatarLi Wang <liwang@ubuntukylin.com>
Reviewed-by: default avatarMilosz Tanski <milosz@adfin.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b4195883
......@@ -216,7 +216,7 @@ static int readpage_nounlock(struct file *filp, struct page *page)
}
SetPageUptodate(page);
if (err == 0)
if (err >= 0)
ceph_readpage_to_fscache(inode, page);
out:
......
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