summaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authorHenry C Chang <henry.cy.chang@gmail.com>2011-05-03 11:45:16 +0200
committerSage Weil <sage@newdream.net>2011-05-03 18:28:12 +0200
commit8c71897be2ddfd84969412635ca42fa9e137f7b6 (patch)
tree7403c84c264f1fd0110869bad68405fcaf6c80ba /fs/ceph/addr.c
parentlibceph: fix ceph_msg_new error path (diff)
downloadlinux-8c71897be2ddfd84969412635ca42fa9e137f7b6.tar.xz
linux-8c71897be2ddfd84969412635ca42fa9e137f7b6.zip
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>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r--fs/ceph/addr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index e159c529fd2b..38b8ab554924 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -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);