Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc5ccfb7 authored by Maxim Korotkov's avatar Maxim Korotkov Committed by Greg Kroah-Hartman
Browse files

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: 2a814908 ("writeback: implement foreign cgroup inode detection")
Signed-off-by: default avatarMaxim Korotkov <korotkov.maxim.s@gmail.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230119104443.3002-1-korotkov.maxim.s@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9c1fcb97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -700,7 +700,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);
	}