Skip to content

Commit 814b849

Browse files
author
Trond Myklebust
committed
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: 9888d83 ("pNFS: Force a retry of LAYOUTGET if the stateid doesn't match our cache") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 6ee1d74 commit 814b849

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/nfs/pnfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,6 +2417,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
24172417
spin_unlock(&ino->i_lock);
24182418
lseg->pls_layout = lo;
24192419
NFS_SERVER(ino)->pnfs_curr_ld->free_lseg(lseg);
2420+
pnfs_free_lseg_list(&free_me);
24202421
return ERR_PTR(-EAGAIN);
24212422
}
24222423

0 commit comments

Comments
 (0)