2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-24 05:04:00 +08:00

ceph: checking for IS_ERR instead of NULL

ceph_osdc_alloc_request() returns NULL on error, it never returns error
pointers.

Fixes: 5be0389dac ('ceph: re-send AIO write request when getting -EOLDSNAP error')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Dan Carpenter 2016-01-26 12:24:44 +03:00 committed by Ilya Dryomov
parent 36f90b0a2d
commit 1418bf076d

View File

@ -698,8 +698,8 @@ static void ceph_aio_retry_work(struct work_struct *work)
req = ceph_osdc_alloc_request(orig_req->r_osdc, snapc, 2, req = ceph_osdc_alloc_request(orig_req->r_osdc, snapc, 2,
false, GFP_NOFS); false, GFP_NOFS);
if (IS_ERR(req)) { if (!req) {
ret = PTR_ERR(req); ret = -ENOMEM;
req = orig_req; req = orig_req;
goto out; goto out;
} }