Commit ff638b7d authored by Li Wang's avatar Li Wang Committed by Sage Weil

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

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>
parent fc55d2c9
...@@ -216,7 +216,7 @@ static int readpage_nounlock(struct file *filp, struct page *page) ...@@ -216,7 +216,7 @@ static int readpage_nounlock(struct file *filp, struct page *page)
} }
SetPageUptodate(page); SetPageUptodate(page);
if (err == 0) if (err >= 0)
ceph_readpage_to_fscache(inode, page); ceph_readpage_to_fscache(inode, page);
out: 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