let its caller do that if necessary Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- fs/nfs/pnfs.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 40d1dc6..a27df2b 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -844,8 +844,6 @@ pnfs_has_layout(struct pnfs_layout_hdr *lo, list_for_each_entry(lseg, &lo->segs, fi_list) { if (is_matching_lseg(lseg, range)) { ret = lseg; - if (lseg->valid) - get_lseg(ret); break; } if (cmp_layout(range, &lseg->range) > 0) @@ -857,7 +855,6 @@ pnfs_has_layout(struct pnfs_layout_hdr *lo, ret ? ret->valid : 0); return ret; } -EXPORT_SYMBOL_GPL(pnfs_has_layout); /* * Layout segment is retreived from the server if not cached. @@ -897,6 +894,7 @@ pnfs_update_layout(struct inode *ino, if (lseg) { dprintk("%s: Using cached lseg %p for iomode %d)\n", __func__, lseg, iomode); + get_lseg(lseg); goto out_unlock; } -- 1.7.2.3 -- 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