From: Anton Protopopov Date: Wed, 10 Feb 2016 17:38:03 +0000 (-0500) Subject: ceph: fix a wrong comparison X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce4355932a9412e0519e70fb1d03d88e39cd621a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Yan, Zheng --- diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index a9f66b66ba35..c9f305089981 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -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 */