Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c71897b authored by Henry C Chang's avatar Henry C Chang Committed by Sage Weil
Browse files

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: default avatarHenry C Chang <henry_c_chang@tcloudcomputing.com>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent ca20892d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -775,6 +775,13 @@ get_more_pages:
					    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);