]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
CIFS: Fix leaking locked VFS cache pages in writeback retry
authorPavel Shilovsky <pshilov@microsoft.com>
Wed, 30 Jan 2019 00:40:28 +0000 (16:40 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 26 Sep 2019 04:34:52 +0000 (00:34 -0400)
commit7a7ac7888924e512fb054da333fb4c3f457e28c3
tree5edc920c6f762a2fbb4a97210fb46f56d56597d0
parent6f2b6e64eeb77a7bf1683c480c31a2750b93b8b4
CIFS: Fix leaking locked VFS cache pages in writeback retry

BugLink: https://bugs.launchpad.net/bugs/1844558
[ Upstream commit 165df9a080b6863ae286fa01780c13d87cd81076 ]

If we don't find a writable file handle when retrying writepages
we break of the loop and do not unlock and put pages neither from
wdata2 nor from the original wdata. Fix this by walking through
all the remaining pages and cleanup them properly.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/cifs/cifssmb.c