]> Git Repo - linux.git/commitdiff
btrfs: make 1-bit bit-fields of scrub_page unsigned int
authorColin Ian King <[email protected]>
Wed, 10 Nov 2021 19:20:08 +0000 (19:20 +0000)
committerDavid Sterba <[email protected]>
Tue, 16 Nov 2021 15:51:11 +0000 (16:51 +0100)
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: 2c36395430b0 ("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]>
fs/btrfs/scrub.c

index cf82ea6f54fb418be744dde63ddf7963583715a4..8f6ceea33969038679debba49eeea7a3f4657939 100644 (file)
@@ -73,8 +73,8 @@ struct scrub_page {
        u64                     physical_for_dev_replace;
        atomic_t                refs;
        u8                      mirror_num;
-       int                     have_csum:1;
-       int                     io_error:1;
+       unsigned int            have_csum:1;
+       unsigned int            io_error:1;
        u8                      csum[BTRFS_CSUM_SIZE];
 
        struct scrub_recover    *recover;
This page took 0.115793 seconds and 4 git commands to generate.