diff options
author | Christoph Hellwig <hch@lst.de> | 2023-05-24 18:03:06 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-06-19 14:59:32 +0300 |
commit | 6e4b2479ab38b3f949a85964da212295d32102f0 (patch) | |
tree | 9c9622d489385600e62295006d24fd43f4bb529d | |
parent | e9cb93b9fbd0bfcef2774e82d095362ad16acf6e (diff) | |
download | linux-6e4b2479ab38b3f949a85964da212295d32102f0.tar.xz |
btrfs: mark the len field in struct btrfs_ordered_sum as unsigned
len can't ever be negative, so mark it as an u32 instead of int.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/file-item.c | 2 | ||||
-rw-r--r-- | fs/btrfs/ordered-data.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 594b69d94241..24b974bb828a 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -561,7 +561,7 @@ int btrfs_lookup_csums_list(struct btrfs_root *root, u64 start, u64 end, } sums->bytenr = start; - sums->len = (int)size; + sums->len = size; offset = bytes_to_csum_size(fs_info, start - key.offset); diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h index f0f1138d23c3..2e54820a5e6f 100644 --- a/fs/btrfs/ordered-data.h +++ b/fs/btrfs/ordered-data.h @@ -20,7 +20,7 @@ struct btrfs_ordered_sum { /* * this is the length in bytes covered by the sums array below. */ - int len; + u32 len; struct list_head list; /* last field is a variable length array of csums */ u8 sums[]; |