1
0
Fork 0

ceph: fix a wrong comparison

A negative value rc compared to the positive value ENOENT in the
finish_read() function.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: Yan, Zheng <zyan@redhat.com>
hifive-unleashed-5.1
Anton Protopopov 2016-02-10 12:38:03 -05:00 committed by Ilya Dryomov
parent 8bbd47140c
commit ce4355932a
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ static void finish_read(struct ceph_osd_request *req, struct ceph_msg *msg)
for (i = 0; i < num_pages; i++) {
struct page *page = osd_data->pages[i];
if (rc < 0 && rc != ENOENT)
if (rc < 0 && rc != -ENOENT)
goto unlock;
if (bytes < (int)PAGE_CACHE_SIZE) {
/* zero (remainder of) page */