ceph fscache: Uncaching no data page from fscache in readpage()
authorLi Wang <liwang@ubuntukylin.com>
Thu, 19 Dec 2013 14:03:49 +0000 (06:03 -0800)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 31 Dec 2013 18:32:03 +0000 (20:32 +0200)
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>
fs/ceph/addr.c

index ebda329611be484e99cedff0d4735f5f0ae95d7e..791a9a23fc6014d88813471b65f5ea64444dbda4 100644 (file)
@@ -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) {
This page took 0.025044 seconds and 5 git commands to generate.