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: Henry C Chang <henry_c_chang@tcloudcomputing.com> Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
ca20892db7
commit
8c71897be2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user