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:
Henry C Chang 2011-05-03 09:45:16 +00:00 committed by Sage Weil
parent ca20892db7
commit 8c71897be2
1 changed files with 7 additions and 0 deletions

View File

@ -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);