[Devel] [PATCH RHEL8 COMMIT] dm-ploop: Actually zero tail of tail page

Konstantin Khorenko khorenko at virtuozzo.com
Thu Dec 17 18:59:05 MSK 2020


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.2
------>
commit f9ebd8db47ba16a3d5f023172ab10fb87463bcab
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Dec 17 18:59:04 2020 +0300

    dm-ploop: Actually zero tail of tail page
    
    @from is temporary buffer. We have to zero tail of @to instead.
    
    https://jira.sw.ru/browse/PSBM-123784
    Fixes: 0497d745e201 "ploop: Zero tail of tail page"
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-bat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-bat.c b/drivers/md/dm-ploop-bat.c
index da18dd2e4638..3fcdf248c490 100644
--- a/drivers/md/dm-ploop-bat.c
+++ b/drivers/md/dm-ploop-bat.c
@@ -169,7 +169,7 @@ static int ploop_read_bat(struct ploop *ploop, struct bio *bio)
 			memcpy(to, from, nr_copy * sizeof(map_index_t));
 			kunmap(bio->bi_io_vec[page].bv_page);
 			if (unlikely(nr_copy < BAT_ENTRIES_PER_PAGE)) {
-				memset(from + nr_copy, 0, sizeof(map_index_t) *
+				memset(to + nr_copy, 0, sizeof(map_index_t) *
 				       (BAT_ENTRIES_PER_PAGE - nr_copy));
 			}
 


More information about the Devel mailing list