Commit 6e4b2479 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David Sterba
Browse files

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: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e9cb93b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);

+1 −1
Original line number Diff line number Diff line
@@ -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[];