Skip to content

Commit 78d4d6a

Browse files
Colin Ian Kinggregkh
Colin Ian King
authored andcommitted
btrfs: make 1-bit bit-fields of scrub_page unsigned int
[ Upstream commit d08e38b ] The bitfields have_csum and io_error are currently signed which is not recommended as the representation is an implementation defined behaviour. Fix this by making the bit-fields unsigned ints. Fixes: 2c36395 ("btrfs: scrub: remove the anonymous structure from scrub_page") Reviewed-by: Josef Bacik <[email protected]> Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 68c50b5 commit 78d4d6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/btrfs/scrub.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ struct scrub_page {
7373
u64 physical_for_dev_replace;
7474
atomic_t refs;
7575
u8 mirror_num;
76-
int have_csum:1;
77-
int io_error:1;
76+
unsigned int have_csum:1;
77+
unsigned int io_error:1;
7878
u8 csum[BTRFS_CSUM_SIZE];
7979

8080
struct scrub_recover *recover;

0 commit comments

Comments
 (0)