Commit ff638b7df5a9264024a6448bdfde2b2bf5d1994a

Authored by Li Wang
Committed by Sage Weil
1 parent fc55d2c944

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: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Milosz Tanski <milosz@adfin.com>
Reviewed-by: Sage Weil <sage@inktank.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -216,7 +216,7 @@
216 216 }
217 217 SetPageUptodate(page);
218 218  
219   - if (err == 0)
  219 + if (err >= 0)
220 220 ceph_readpage_to_fscache(inode, page);
221 221  
222 222 out: