Patch "libnvdimm/btt: fix variable 'rc' set but not used" has been added to the 4.19-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

    libnvdimm/btt: fix variable 'rc' set but not used

to the 4.19-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:
     libnvdimm-btt-fix-variable-rc-set-but-not-used.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 345761e9756ff79e2f5b115c14e61900e318cc7c
Author: Qian Cai <cai@xxxxxx>
Date:   Thu Oct 31 10:05:19 2019 -0400

    libnvdimm/btt: fix variable 'rc' set but not used
    
    [ Upstream commit 4e24e37d5313edca8b4ab86f240c046c731e28d6 ]
    
    drivers/nvdimm/btt.c: In function 'btt_read_pg':
    drivers/nvdimm/btt.c:1264:8: warning: variable 'rc' set but not used
    [-Wunused-but-set-variable]
        int rc;
            ^~
    
    Add a ratelimited message in case a storm of errors is encountered.
    
    Fixes: d9b83c756953 ("libnvdimm, btt: rework error clearing")
    Signed-off-by: Qian Cai <cai@xxxxxx>
    Reviewed-by: Vishal Verma <vishal.l.verma@xxxxxxxxx>
    Link: https://lore.kernel.org/r/1572530719-32161-1-git-send-email-cai@xxxxxx
    Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 0360c015f658..75ae2c508a04 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1260,11 +1260,11 @@ static int btt_read_pg(struct btt *btt, struct bio_integrity_payload *bip,
 
 		ret = btt_data_read(arena, page, off, postmap, cur_len);
 		if (ret) {
-			int rc;
-
 			/* Media error - set the e_flag */
-			rc = btt_map_write(arena, premap, postmap, 0, 1,
-				NVDIMM_IO_ATOMIC);
+			if (btt_map_write(arena, premap, postmap, 0, 1, NVDIMM_IO_ATOMIC))
+				dev_warn_ratelimited(to_dev(arena),
+					"Error persistently tracking bad blocks at %#x\n",
+					premap);
 			goto out_rtt;
 		}
 



[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