diff options
author | Benny Halevy <benny@tonian.com> | 2011-06-14 22:30:16 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-06-15 17:24:31 +0200 |
commit | d771e3a43e23a37398b7e05a9d1b1036d698263c (patch) | |
tree | 60bdf8b0722527c7d48a76abc1f57dddc6d0ddc5 /fs/nfs | |
parent | nfs4.1: fix several problems with _pnfs_return_layout (diff) | |
download | linux-d771e3a43e23a37398b7e05a9d1b1036d698263c.tar.xz linux-d771e3a43e23a37398b7e05a9d1b1036d698263c.zip |
NFSv4.1: fix break condition in pnfs_find_lseg
The break condition to skip out of the loop got broken when cmp_layout
was change. Essentially, we want to stop looking once we know no layout
on the remainder of the list can match the first byte of the looked-up
range.
Reported-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Benny Halevy <benny@tonian.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | 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 25de6b27bdf4..d066aad608ad 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -889,7 +889,7 @@ pnfs_find_lseg(struct pnfs_layout_hdr *lo, ret = get_lseg(lseg); break; } - if (cmp_layout(range, &lseg->pls_range) > 0) + if (lseg->pls_range.offset > range->offset) break; } |