提交 1418bf07 编写于 作者: D Dan Carpenter 提交者: Ilya Dryomov

ceph: checking for IS_ERR instead of NULL

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

Fixes: 5be0389d ('ceph: re-send AIO write request when getting -EOLDSNAP error')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 36f90b0a
......@@ -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,
false, GFP_NOFS);
if (IS_ERR(req)) {
ret = PTR_ERR(req);
if (!req) {
ret = -ENOMEM;
req = orig_req;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册