summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-03 18:23:36 +0200
committerSage Weil <sage@newdream.net>2011-05-03 18:28:13 +0200
commit4ad12621e442b7a072e81270808f617cb65c5672 (patch)
treeeecdd1d51f525b9b07c70f8fbcf08c9ede3b8f79 /drivers
parentceph: handle ceph_osdc_new_request failure in ceph_writepages_start (diff)
downloadlinux-4ad12621e442b7a072e81270808f617cb65c5672.tar.xz
linux-4ad12621e442b7a072e81270808f617cb65c5672.zip
libceph: fix ceph_osdc_alloc_request error checks
ceph_osdc_alloc_request returns NULL on failure. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 16dc3645291c..3e904717c1c0 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -777,9 +777,9 @@ static int rbd_do_request(struct request *rq,
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;
}