pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 21 Jan 2021 21:34:37 +0000 (16:34 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 25 Jan 2021 01:52:30 +0000 (20:52 -0500)
commit814b84971388cd5fb182f2e914265b3827758455
tree8ea5e8f9f5b6e696b8174167b60b5a180cfc0fc1
parent6ee1d745b7c9fd573fba142a2efdad76a9f1cb04
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: 9888d837f3cf ("pNFS: Force a retry of LAYOUTGET if the stateid doesn't match our cache")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pnfs.c