diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-01-26 04:24:44 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-02-04 12:25:08 -0500 |
commit | 1418bf076d08edd47a610ea3844c6f6012949a51 (patch) | |
tree | 94adc36a2fbc50aa8bdd82c2e8f4c89f696b6c91 | |
parent | 36f90b0a2ddd60823fe193a85e60ff1906c2a9b3 (diff) |
ceph: checking for IS_ERR instead of NULL
ceph_osdc_alloc_request() returns NULL on error, it never returns error
pointers.
Fixes: 5be0389dac66 ('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>
-rw-r--r-- | fs/ceph/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 86a9c383955e..7c85ddef68ab 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -698,8 +698,8 @@ static void ceph_aio_retry_work(struct work_struct *work) | |||
698 | 698 | ||
699 | req = ceph_osdc_alloc_request(orig_req->r_osdc, snapc, 2, | 699 | req = ceph_osdc_alloc_request(orig_req->r_osdc, snapc, 2, |
700 | false, GFP_NOFS); | 700 | false, GFP_NOFS); |
701 | if (IS_ERR(req)) { | 701 | if (!req) { |
702 | ret = PTR_ERR(req); | 702 | ret = -ENOMEM; |
703 | req = orig_req; | 703 | req = orig_req; |
704 | goto out; | 704 | goto out; |
705 | } | 705 | } |