All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fred Isaman <iisaman@netapp.com>
To: linux-nfs@vger.kernel.org
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	Fred Isaman <iisaman@netapp.com>
Subject: [PATCH 1/1] nfs4.1: pnfs_find_lseg only looks at first element in list
Date: Tue, 14 Jun 2011 09:56:28 -0400	[thread overview]
Message-ID: <1308059788-17381-1-git-send-email-iisaman@netapp.com> (raw)

The break condition to skip out of the loop if we've gone too far was
reversed, causing the function to abort after looking at the first
list entry.

Reported-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
 fs/nfs/pnfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 1abb300..c640f91 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -895,7 +895,7 @@ pnfs_find_lseg(struct pnfs_layout_hdr *lo,
 			ret = get_lseg(lseg);
 			break;
 		}
-		if (cmp_layout(range, &lseg->pls_range) > 0)
+		if (cmp_layout(range, &lseg->pls_range) < 0)
 			break;
 	}
 
-- 
1.7.2.1


             reply	other threads:[~2011-06-14 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 13:56 Fred Isaman [this message]
2011-06-14 14:38 ` [PATCH 1/1] nfs4.1: pnfs_find_lseg only looks at first element in list Benny Halevy
2011-06-14 20:30   ` [PATCH] NFSv4.1: fix break condition in pnfs_find_lseg Benny Halevy

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=1308059788-17381-1-git-send-email-iisaman@netapp.com \
    --to=iisaman@netapp.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.