NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 12 Aug 2019 19:19:54 +0000 (15:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:22:22 +0000 (10:22 +0200)
commit812de6dee596e10d46ce3d7dc4736fa288218117
tree9fafdcc358ba3979d5f13a36f55401ea7dae9cdd
parent57c491fd844d71a1d1e472204153aa86e2a3dd6e
NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend()

[ Upstream commit f4340e9314dbfadc48758945f85fc3b16612d06f ]

If the attempt to resend the pages fails, we need to ensure that we
clean up those pages that were not transmitted.

Fixes: d600ad1f2bdb ("NFS41: pop some layoutget errors to application")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org # v4.5+
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/pagelist.c