projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
240634e
)
rbd: null vs ERR_PTR
author
Dan Carpenter
<error27@gmail.com>
Mon, 11 Oct 2010 19:14:23 +0000
(21:14 +0200)
committer
Sage Weil
<sage@newdream.net>
Wed, 20 Oct 2010 22:38:24 +0000
(15:38 -0700)
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>
drivers/block/rbd.c
patch
|
blob
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index
1ac87f1
..
52f9420
100644
(file)
--- a/
drivers/block/rbd.c
+++ b/
drivers/block/rbd.c
@@
-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);