Commit 814b8497 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()



If the server returns a new stateid that does not match the one in our
cache, then pnfs_layout_process() will leak the layout segments returned
by pnfs_mark_layout_stateid_invalid().

Fixes: 9888d837 ("pNFS: Force a retry of LAYOUTGET if the stateid doesn't match our cache")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 6ee1d745
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2417,6 +2417,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
	spin_unlock(&ino->i_lock);
	lseg->pls_layout = lo;
	NFS_SERVER(ino)->pnfs_curr_ld->free_lseg(lseg);
	pnfs_free_lseg_list(&free_me);
	return ERR_PTR(-EAGAIN);
}