From: Andy Adamson <andros@xxxxxxxxxx> Lost in merge from Fred's lseg rewrite. squash into: pnfs-submit-wave3-lseg-refcounting Signed-off-by: Andy Adamson <andros@xxxxxxxxxx> --- fs/nfs/pnfs.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 31e5f55..dc15a76 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -278,9 +278,12 @@ put_lseg(struct pnfs_layout_segment *lseg) test_bit(NFS_LSEG_VALID, &lseg->pls_flags)); ino = lseg->pls_layout->plh_inode; if (atomic_dec_and_lock(&lseg->pls_refcount, &ino->i_lock)) { + LIST_HEAD(free_me); + _put_lseg_common(lseg); + list_add(&lseg->pls_list, &free_me); spin_unlock(&ino->i_lock); - free_lseg(lseg); + pnfs_free_lseg_list(&free_me); } } EXPORT_SYMBOL_GPL(put_lseg); -- 1.6.6 -- 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