提交 8c71897b 编写于 作者: H Henry C Chang 提交者: Sage Weil

ceph: handle ceph_osdc_new_request failure in ceph_writepages_start

We should unlock the page and return -ENOMEM if ceph_osdc_new_request
failed.
Signed-off-by: NHenry C Chang <henry_c_chang@tcloudcomputing.com>
Signed-off-by: NSage Weil <sage@newdream.net>
上级 ca20892d
......@@ -775,6 +775,13 @@ static int ceph_writepages_start(struct address_space *mapping,
ci->i_truncate_seq,
ci->i_truncate_size,
&inode->i_mtime, true, 1, 0);
if (!req) {
rc = -ENOMEM;
unlock_page(page);
break;
}
max_pages = req->r_num_pages;
alloc_page_vec(fsc, req);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册