Patch "writeback: fix call of incorrect macro" has been added to the 4.14-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

    writeback: fix call of incorrect macro

to the 4.14-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:
     writeback-fix-call-of-incorrect-macro.patch
and it can be found in the queue-4.14 subdirectory.

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



commit 01d00358d118457b896e5fa3322367ec134ff883
Author: Maxim Korotkov <korotkov.maxim.s@xxxxxxxxx>
Date:   Thu Jan 19 13:44:43 2023 +0300

    writeback: fix call of incorrect macro
    
    [ Upstream commit 3e46c89c74f2c38e5337d2cf44b0b551adff1cb4 ]
    
     the variable 'history' is of type u16, it may be an error
     that the hweight32 macro was used for it
     I guess macro hweight16 should be used
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 2a81490811d0 ("writeback: implement foreign cgroup inode detection")
    Signed-off-by: Maxim Korotkov <korotkov.maxim.s@xxxxxxxxx>
    Reviewed-by: Jan Kara <jack@xxxxxxx>
    Link: https://lore.kernel.org/r/20230119104443.3002-1-korotkov.maxim.s@xxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index be6096f195c5a..05e2fbe892199 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -702,7 +702,7 @@ void wbc_detach_inode(struct writeback_control *wbc)
 		 * is okay.  The main goal is avoiding keeping an inode on
 		 * the wrong wb for an extended period of time.
 		 */
-		if (hweight32(history) > WB_FRN_HIST_THR_SLOTS)
+		if (hweight16(history) > WB_FRN_HIST_THR_SLOTS)
 			inode_switch_wbs(inode, max_id);
 	}
 



[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