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)
committerSteve French <stfrench@microsoft.com>
Tue, 5 Mar 2019 02:05:34 +0000 (20:05 -0600)
commit165df9a080b6863ae286fa01780c13d87cd81076
treee8e6ac557b3f08c4e8f49cd82788bdbbf6a1d2ae
parent1c163f4c7b3f621efff9b28a47abb36f7378d783
CIFS: Fix leaking locked VFS cache pages in writeback retry

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>
fs/cifs/cifssmb.c