Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1331361 > unrolled thread
| Started by | Anton Protopopov <a.s.protopopov@gmail.com> |
|---|---|
| First post | 2016-02-10 18:40 +0100 |
| Last post | 2016-02-11 04:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ceph: fix a wrong comparison Anton Protopopov <a.s.protopopov@gmail.com> - 2016-02-10 18:40 +0100
Re: [PATCH] ceph: fix a wrong comparison "Yan, Zheng" <zyan@redhat.com> - 2016-02-11 04:00 +0100
| From | Anton Protopopov <a.s.protopopov@gmail.com> |
|---|---|
| Date | 2016-02-10 18:40 +0100 |
| Subject | [PATCH] ceph: fix a wrong comparison |
| Message-ID | <r0GUa-5nr-9@gated-at.bofh.it> |
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>
---
fs/ceph/addr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index c222137..1b809c9 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 */
--
2.6.5
[toc] | [next] | [standalone]
| From | "Yan, Zheng" <zyan@redhat.com> |
|---|---|
| Date | 2016-02-11 04:00 +0100 |
| Message-ID | <r0PE6-2u2-9@gated-at.bofh.it> |
| In reply to | #1331361 |
> On Feb 11, 2016, at 01:38, Anton Protopopov <a.s.protopopov@gmail.com> wrote:
>
> 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>
> ---
> fs/ceph/addr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index c222137..1b809c9 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 */
Good catch, thanks
Yan, Zheng
> --
> 2.6.5
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web