提交 368e3585 编写于 作者: Y Yan, Zheng 提交者: Ilya Dryomov

ceph: call __fscache_uncache_page() if readpages fails

If readpages fails, fscache needs to cleanup its internal state.
Signed-off-by: NYan, Zheng <zyan@redhat.com>
上级 480ce08a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册