summaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-03 09:23:36 -0700
committerSage Weil <sage@newdream.net>2011-05-03 09:28:13 -0700
commit4ad12621e442b7a072e81270808f617cb65c5672 (patch)
treeeecdd1d51f525b9b07c70f8fbcf08c9ede3b8f79 /net/ceph/osd_client.c
parent8c71897be2ddfd84969412635ca42fa9e137f7b6 (diff)
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 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 5a80f41c0cb..6b5dda1cb5d 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -470,8 +470,8 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
snapc, ops,
use_mempool,
GFP_NOFS, NULL, NULL);
- if (IS_ERR(req))
- return req;
+ if (!req)
+ return NULL;
/* calculate max write size */
calc_layout(osdc, vino, layout, off, plen, req, ops);