Patch "dm writecache: correct uncommitted_block when discarding uncommitted entry" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dm writecache: correct uncommitted_block when discarding uncommitted entry

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dm-writecache-correct-uncommitted_block-when-discarding-uncommitted-entry.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 39495b12ef1cf602e6abd350dce2ef4199906531 Mon Sep 17 00:00:00 2001
From: Huaisheng Ye <yehs1@xxxxxxxxxx>
Date: Fri, 12 Jun 2020 23:59:11 +0800
Subject: dm writecache: correct uncommitted_block when discarding uncommitted entry

From: Huaisheng Ye <yehs1@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
Signed-off-by: Huaisheng Ye <yehs1@xxxxxxxxxx>
Acked-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>
Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/md/dm-writecache.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -805,6 +805,8 @@ static void writecache_discard(struct dm
 				writecache_wait_for_ios(wc, WRITE);
 				discarded_something = true;
 			}
+			if (!writecache_entry_is_committed(wc, e))
+				wc->uncommitted_blocks--;
 			writecache_free_entry(wc, e);
 		}
 


Patches currently in stable-queue which might be from yehs1@xxxxxxxxxx are

queue-5.4/dm-writecache-correct-uncommitted_block-when-discarding-uncommitted-entry.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux