writeback: fix call of incorrect macro
PATCH 1/1 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.
--- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fs-writeback.c +1 -1
@@ -829,7 +829,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); }
Signature · 1 line
2.37.2
Quoted 8 lines · Maxim Korotkov
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 usedFound by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes 2a81490811d0 ("writeback: implement foreign cgroup inode detection")Signed-off-by Maxim Korotkov <[email protected]>
Looks good to me, although it is mostly a theoretical issue - I don't see how hweight32 could do any harm here. Anyway, feel free to add:
Honza
Quoted 20 lines
--- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/fs-writeback.c +1
-1@@ -829,7 +829,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); }Signature · 1 line
2.37.2
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Hi,
Will this patch be applied or rejected?
best regards, Max
Quoted 37 lines · Jan Kara
Quoted 8 lines · Maxim Korotkov
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 usedFound by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes 2a81490811d0 ("writeback: implement foreign cgroup inode detection")Signed-off-by Maxim Korotkov <[email protected]>Looks good to me, although it is mostly a theoretical issue - I don't see how hweight32 could do any harm here. Anyway, feel free to add:
Reviewed-by Jan Kara <[email protected]>Honza
Quoted 20 lines
--- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/fs-writeback.c +1
-1@@ -829,7 +829,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); }Signature · 1 line
2.37.2
Jan Kara
reviewerHi!
Jens, can you please pickup this patch? It has fallen through the cracks. Usually you tend to be picking up cgroup writeback stuff. Thanks!
Honza
Quoted 42 lines · Maxim Korotkov
Hi,
Will this patch be applied or rejected?
best regards, MaxQuoted 36 lines · Jan Kara
Quoted 8 lines · Maxim Korotkov
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 usedFound by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes 2a81490811d0 ("writeback: implement foreign cgroup inode detection")Signed-off-by Maxim Korotkov <[email protected]>Looks good to me, although it is mostly a theoretical issue - I don't see how hweight32 could do any harm here. Anyway, feel free to add:
Reviewed-by Jan Kara <[email protected]>Honza
Quoted 19 lines
--- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/fs-writeback.c +1
-1@@ -829,7 +829,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); }Signature · 1 line
2.37.2
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Jens Axboe
AppliedQuoted 8 lines · Maxim Korotkov
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 usedFound by Linux Verification Center (linuxtesting.org) with SVACE.
[...]
Applied, thanks!
[1/1] writeback: fix call of incorrect macro
commit: 3e46c89c74f2c38e5337d2cf44b0b551adff1cb4
Best regards,
Signature · 1 line
Jens Axboe