@@ -790,20 +790,20 @@ pnfs_find_alloc_layout(struct inode *ino)
* READ RW true
*/
static int
-is_matching_lseg(struct pnfs_layout_segment *lseg,
+is_matching_lseg(struct pnfs_layout_range *ls_range,
struct pnfs_layout_range *range)
{
struct pnfs_layout_range range1;
if ((range->iomode == IOMODE_RW &&
- lseg->pls_range.iomode != IOMODE_RW) ||
- !lo_seg_intersecting(&lseg->pls_range, range))
+ ls_range->iomode != IOMODE_RW) ||
+ !lo_seg_intersecting(ls_range, range))
return 0;
/* range1 covers only the first byte in the range */
range1 = *range;
range1.length = 1;
- return lo_seg_contained(&lseg->pls_range, &range1);
+ return lo_seg_contained(ls_range, &range1);
}
/*
@@ -820,7 +820,7 @@ pnfs_find_lseg(struct pnfs_layout_hdr *lo,
assert_spin_locked(&lo->plh_inode->i_lock);
list_for_each_entry(lseg, &lo->plh_segs, pls_list) {
if (test_bit(NFS_LSEG_VALID, &lseg->pls_flags) &&
- is_matching_lseg(lseg, range)) {
+ is_matching_lseg(&lseg->pls_range, range)) {
ret = get_lseg(lseg);
break;
}
Signed-off-by: Benny Halevy <bhalevy@panasas.com> --- fs/nfs/pnfs.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)