mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
rbd: null vs ERR_PTR
ceph_alloc_page_vector() returns ERR_PTR(-ENOMEM) on errors. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Sage Weil <[email protected]>
This commit is contained in:
parent
240634e9b3
commit
b8d0638a98
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue