Skip to content

Commit 3e46c89

Browse files
ProjectMutilationaxboe
authored andcommitted
writeback: fix call of incorrect macro
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: 2a81490 ("writeback: implement foreign cgroup inode detection") Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230119104443.3002-1-korotkov.maxim.s@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent f40c153 commit 3e46c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/fs-writeback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ void wbc_detach_inode(struct writeback_control *wbc)
829829
* is okay. The main goal is avoiding keeping an inode on
830830
* the wrong wb for an extended period of time.
831831
*/
832-
if (hweight32(history) > WB_FRN_HIST_THR_SLOTS)
832+
if (hweight16(history) > WB_FRN_HIST_THR_SLOTS)
833833
inode_switch_wbs(inode, max_id);
834834
}
835835

0 commit comments

Comments
 (0)