Commit 2e1b3f4
rbd: check snap_count against RBD_MAX_SNAP_COUNT
snap_count is u32 but the comparison is against a SIZE_MAX-derived value
(~2^61 on 64-bit), which clang flags as always false with
-Wtautological-constant-out-of-range-compare.
The proper check here should be that snap_count does not go over
RBD_MAX_SNAP_COUNT.
Assisted-by: Opencode:Big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20260530011255.52916-1-rosenp@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 2957771 commit 2e1b3f4
1 file changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6094 | 6094 | | |
6095 | 6095 | | |
6096 | 6096 | | |
6097 | | - | |
6098 | | - | |
6099 | | - | |
| 6097 | + | |
6100 | 6098 | | |
6101 | | - | |
6102 | | - | |
| 6099 | + | |
6103 | 6100 | | |
6104 | 6101 | | |
6105 | 6102 | | |
| |||
0 commit comments