dm writecache: correct uncommitted_block when discarding uncommitted entry
commit22551da148c98636fe91b66b8dba3a1d1e1e46cc
authorHuaisheng Ye <yehs1@lenovo.com>
Fri, 12 Jun 2020 15:59:11 +0000 (12 23:59 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:36:31 +0000 (30 15:36 -0400)
tree475d091c001b7627ecc008ef666168395097d774
parent301cca2f313a0b6167e9b033bdd25a258c202693
dm writecache: correct uncommitted_block when discarding uncommitted entry

commit 39495b12ef1cf602e6abd350dce2ef4199906531 upstream.

When uncommitted entry has been discarded, correct wc->uncommitted_block
for getting the exact number.

Fixes: 48debafe4f2fe ("dm: add writecache target")
Cc: stable@vger.kernel.org
Signed-off-by: Huaisheng Ye <yehs1@lenovo.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-writecache.c