Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- fs/nfs/pnfs.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 9d41cab..9b67b1c 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -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; } -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html