diff options
author | Dan Carpenter <error27@gmail.com> | 2010-10-11 15:14:23 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-10-20 18:38:24 -0400 |
commit | b8d0638a98aa4a42ff322234b882487cd74e5c52 (patch) | |
tree | 4ab89ab0a293d404466106dd6bced5d68c171ce1 /drivers/block/rbd.c | |
parent | 240634e9b3a8ae2a9e2b7effeea3b9a5b30d68fb (diff) |
rbd: null vs ERR_PTR
ceph_alloc_page_vector() returns ERR_PTR(-ENOMEM) on errors.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 1ac87f182057..52f9420704c7 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -826,8 +826,8 @@ static int rbd_req_sync_op(struct rbd_device *dev, | |||
826 | 826 | ||
827 | num_pages = calc_pages_for(ofs , len); | 827 | num_pages = calc_pages_for(ofs , len); |
828 | pages = ceph_alloc_page_vector(num_pages, GFP_KERNEL); | 828 | pages = ceph_alloc_page_vector(num_pages, GFP_KERNEL); |
829 | if (!pages) | 829 | if (IS_ERR(pages)) |
830 | return -ENOMEM; | 830 | return PTR_ERR(pages); |
831 | 831 | ||
832 | if (!orig_ops) { | 832 | if (!orig_ops) { |
833 | payload_len = (flags & CEPH_OSD_FLAG_WRITE ? len : 0); | 833 | payload_len = (flags & CEPH_OSD_FLAG_WRITE ? len : 0); |