Patch "md/raid1: rename print_msg with r1bio_existed" has been added to the 5.10-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/raid1: rename print_msg with r1bio_existed

to the 5.10-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-raid1-rename-print_msg-with-r1bio_existed.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 6e1e82a8c27fbabd5ccde79138067a6be4a09373
Author: Guoqing Jiang <jgq516@xxxxxxxxx>
Date:   Tue May 25 17:46:20 2021 +0800

    md/raid1: rename print_msg with r1bio_existed
    
    [ Upstream commit 9b8ae7b938235229ccb112c4e887ff1bcc232836 ]
    
    The caller of raid1_read_request could pass NULL or a valid pointer for
    "struct r1bio *r1_bio", so it actually means whether r1_bio is existed
    or not.
    
    Signed-off-by: Guoqing Jiang <jiangguoqing@xxxxxxxxxx>
    Signed-off-by: Song Liu <song@xxxxxxxxxx>
    Stable-dep-of: 1727fd5015d8 ("md: Replace snprintf with scnprintf")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index fb31e5dd54a6..b08f44c791fa 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1208,7 +1208,7 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio,
 	const unsigned long do_sync = (bio->bi_opf & REQ_SYNC);
 	int max_sectors;
 	int rdisk;
-	bool print_msg = !!r1_bio;
+	bool r1bio_existed = !!r1_bio;
 	char b[BDEVNAME_SIZE];
 
 	/*
@@ -1218,7 +1218,7 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio,
 	 */
 	gfp_t gfp = r1_bio ? (GFP_NOIO | __GFP_HIGH) : GFP_NOIO;
 
-	if (print_msg) {
+	if (r1bio_existed) {
 		/* Need to get the block device name carefully */
 		struct md_rdev *rdev;
 		rcu_read_lock();
@@ -1250,7 +1250,7 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio,
 
 	if (rdisk < 0) {
 		/* couldn't find anywhere to read from */
-		if (print_msg) {
+		if (r1bio_existed) {
 			pr_crit_ratelimited("md/raid1:%s: %s: unrecoverable I/O read error for block %llu\n",
 					    mdname(mddev),
 					    b,
@@ -1261,7 +1261,7 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio,
 	}
 	mirror = conf->mirrors + rdisk;
 
-	if (print_msg)
+	if (r1bio_existed)
 		pr_info_ratelimited("md/raid1:%s: redirecting sector %llu to other mirror: %s\n",
 				    mdname(mddev),
 				    (unsigned long long)r1_bio->sector,



[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