From: Yan, Zheng Date: Tue, 17 May 2016 03:58:02 +0000 (+0800) Subject: ceph: call __fscache_uncache_page() if readpages fails X-Git-Tag: v4.14-rc1~3072^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=368e35857dfab264f512d040c4486c9b13297988;p=platform%2Fkernel%2Flinux-rpi.git ceph: call __fscache_uncache_page() if readpages fails If readpages fails, fscache needs to cleanup its internal state. Signed-off-by: Yan, Zheng --- diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index eeb71e5..4ff62fc 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -276,8 +276,10 @@ static void finish_read(struct ceph_osd_request *req) for (i = 0; i < num_pages; i++) { struct page *page = osd_data->pages[i]; - if (rc < 0 && rc != -ENOENT) + if (rc < 0 && rc != -ENOENT) { + ceph_fscache_readpage_cancel(inode, page); goto unlock; + } if (bytes < (int)PAGE_SIZE) { /* zero (remainder of) page */ int s = bytes < 0 ? 0 : bytes;