diff options
author | Henry C Chang <henry.cy.chang@gmail.com> | 2011-05-03 05:45:16 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-05-03 12:28:12 -0400 |
commit | 8c71897be2ddfd84969412635ca42fa9e137f7b6 (patch) | |
tree | 7403c84c264f1fd0110869bad68405fcaf6c80ba /fs/ceph | |
parent | ca20892db7567c40e8ed0668f46cf0d085d7db6d (diff) |
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.c | 7 |
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: | |||
775 | ci->i_truncate_seq, | 775 | ci->i_truncate_seq, |
776 | ci->i_truncate_size, | 776 | ci->i_truncate_size, |
777 | &inode->i_mtime, true, 1, 0); | 777 | &inode->i_mtime, true, 1, 0); |
778 | |||
779 | if (!req) { | ||
780 | rc = -ENOMEM; | ||
781 | unlock_page(page); | ||
782 | break; | ||
783 | } | ||
784 | |||
778 | max_pages = req->r_num_pages; | 785 | max_pages = req->r_num_pages; |
779 | 786 | ||
780 | alloc_page_vec(fsc, req); | 787 | alloc_page_vec(fsc, req); |