mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zyan@redhat.com>
To: Anton Protopopov <a.s.protopopov@gmail.com>
Cc: Sage Weil <sage@redhat.com>, Ilya Dryomov <idryomov@gmail.com>,
	ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ceph: fix a wrong comparison
Date: Thu, 11 Feb 2016 10:52:14 +0800	[thread overview]
Message-ID: <1ED8DAC2-EEA9-4D59-A396-A0B08FC92416@redhat.com> (raw)
In-Reply-To: <1455125883-27735-1-git-send-email-a.s.protopopov@gmail.com>


> 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
> 

      reply	other threads:[~2016-02-11  2:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 17:38 Anton Protopopov
2016-02-11  2:52 ` Yan, Zheng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ED8DAC2-EEA9-4D59-A396-A0B08FC92416@redhat.com \
    --to=zyan@redhat.com \
    --cc=a.s.protopopov@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sage@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®