From: Li Wang Date: Thu, 19 Dec 2013 14:03:49 +0000 (-0800) Subject: ceph fscache: Uncaching no data page from fscache in readpage() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=183028052b48db2b34c09fd54f0bc465eaa305eb;p=deliverable%2Flinux.git 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 Reviewed-by: Milosz Tanski --- diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index ebda329611be..791a9a23fc60 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) {