summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorHenry C Chang <henry.cy.chang@gmail.com>2011-05-03 09:45:16 +0000
committerSage Weil <sage@newdream.net>2011-05-03 09:28:12 -0700
commit8c71897be2ddfd84969412635ca42fa9e137f7b6 (patch)
tree7403c84c264f1fd0110869bad68405fcaf6c80ba /fs/ceph
parentca20892db7567c40e8ed0668f46cf0d085d7db6d (diff)
downloadlinux-stable-8c71897be2ddfd84969412635ca42fa9e137f7b6.tar.gz
linux-stable-8c71897be2ddfd84969412635ca42fa9e137f7b6.tar.bz2
linux-stable-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')
-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);