summaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authorLi Wang <liwang@ubuntukylin.com>2013-12-19 06:03:49 -0800
committerIlya Dryomov <ilya.dryomov@inktank.com>2013-12-31 20:32:03 +0200
commit183028052b48db2b34c09fd54f0bc465eaa305eb (patch)
treee23c879201e76c551063722d3e31a5ed65f25604 /fs/ceph/addr.c
parent3f42bc4beadef554fd0d4e6408e9142da268613b (diff)
downloadop-kernel-dev-183028052b48db2b34c09fd54f0bc465eaa305eb.zip
op-kernel-dev-183028052b48db2b34c09fd54f0bc465eaa305eb.tar.gz
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: Li Wang <liwang@ubuntukylin.com> Reviewed-by: Milosz Tanski <milosz@adfin.com>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r--fs/ceph/addr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index ebda329..791a9a2 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -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) {
OpenPOWER on IntegriCloud