]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 24 Mar 2021 10:11:26 +0000 (11:11 +0100)
commit6074f1df60b47e1a3f30a0d5ad51ac0e84bc0686
tree8908c769db3f4c7a4aabd6c2b2fa012b82217700
parent12d76665093148c1dd3d5425e96e6676846434da
pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()

BugLink: https://bugs.launchpad.net/bugs/1916056
[ Upstream commit 814b84971388cd5fb182f2e914265b3827758455 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/nfs/pnfs.c