Commit b8d0638a authored by Dan Carpenter's avatar Dan Carpenter Committed by Sage Weil

rbd: null vs ERR_PTR

ceph_alloc_page_vector() returns ERR_PTR(-ENOMEM) on errors.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 240634e9
......@@ -826,8 +826,8 @@ static int rbd_req_sync_op(struct rbd_device *dev,
num_pages = calc_pages_for(ofs , len);
pages = ceph_alloc_page_vector(num_pages, GFP_KERNEL);
if (!pages)
return -ENOMEM;
if (IS_ERR(pages))
return PTR_ERR(pages);
if (!orig_ops) {
payload_len = (flags & CEPH_OSD_FLAG_WRITE ? len : 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment