Patch "md/md-cluster: fix spares warnings for __le64" has been added to the 6.1-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

    md/md-cluster: fix spares warnings for __le64

to the 6.1-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:
     md-md-cluster-fix-spares-warnings-for-__le64.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 82aaf4e755fd58880c1c750ff04047e25f2442e5
Author: Yu Kuai <yukuai3@xxxxxxxxxx>
Date:   Mon Aug 26 15:44:15 2024 +0800

    md/md-cluster: fix spares warnings for __le64
    
    [ Upstream commit 82697ccf7e495c1ba81e315c2886d6220ff84c2c ]
    
    drivers/md/md-cluster.c:1220:22: warning: incorrect type in assignment (different base types)
    drivers/md/md-cluster.c:1220:22:    expected unsigned long my_sync_size
    drivers/md/md-cluster.c:1220:22:    got restricted __le64 [usertype] sync_size
    drivers/md/md-cluster.c:1252:35: warning: incorrect type in assignment (different base types)
    drivers/md/md-cluster.c:1252:35:    expected unsigned long sync_size
    drivers/md/md-cluster.c:1252:35:    got restricted __le64 [usertype] sync_size
    drivers/md/md-cluster.c:1253:41: warning: restricted __le64 degrades to integer
    
    Fix the warnings by using le64_to_cpu() to convet __le64 to integer.
    
    Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240826074452.1490072-6-yukuai1@xxxxxxxxxxxxxxx
    Signed-off-by: Song Liu <song@xxxxxxxxxx>
    Stable-dep-of: 8d28d0ddb986 ("md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
index 10e0c5381d01b..a0d3f6c397707 100644
--- a/drivers/md/md-cluster.c
+++ b/drivers/md/md-cluster.c
@@ -1195,7 +1195,7 @@ static int cluster_check_sync_size(struct mddev *mddev)
 	struct dlm_lock_resource *bm_lockres;
 
 	sb = kmap_atomic(bitmap->storage.sb_page);
-	my_sync_size = sb->sync_size;
+	my_sync_size = le64_to_cpu(sb->sync_size);
 	kunmap_atomic(sb);
 
 	for (i = 0; i < node_num; i++) {
@@ -1227,8 +1227,8 @@ static int cluster_check_sync_size(struct mddev *mddev)
 
 		sb = kmap_atomic(bitmap->storage.sb_page);
 		if (sync_size == 0)
-			sync_size = sb->sync_size;
-		else if (sync_size != sb->sync_size) {
+			sync_size = le64_to_cpu(sb->sync_size);
+		else if (sync_size != le64_to_cpu(sb->sync_size)) {
 			kunmap_atomic(sb);
 			md_bitmap_free(bitmap);
 			return -1;




[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