commit | 4ad12621e442b7a072e81270808f617cb65c5672 | [log] [tgz] |
---|---|---|
author | Sage Weil <sage@newdream.net> | Tue May 03 09:23:36 2011 -0700 |
committer | Sage Weil <sage@newdream.net> | Tue May 03 09:28:13 2011 -0700 |
tree | eecdd1d51f525b9b07c70f8fbcf08c9ede3b8f79 | |
parent | 8c71897be2ddfd84969412635ca42fa9e137f7b6 [diff] [blame] |
libceph: fix ceph_osdc_alloc_request error checks ceph_osdc_alloc_request returns NULL on failure. Signed-off-by: Sage Weil <sage@newdream.net>
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 16dc364..3e90471 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c
@@ -777,9 +777,9 @@ ops, false, GFP_NOIO, pages, bio); - if (IS_ERR(req)) { + if (!req) { up_read(&header->snap_rwsem); - ret = PTR_ERR(req); + ret = -ENOMEM; goto done_pages; }