btrfs: Fixed declaration of old_len
PATCH 1/1 btrfs: Fixed declaration of old_len
old_len is used to store the return value of btrfs_item_size_nr(). The return value of btrfs_item_size_nr() is of type u32. To improve code correctness and avoid mixing signed and unsigned integers I've changed old_len to be of type u32 as well.
Signed-off-by Alexandru Moise <[email protected]>
--- fs/btrfs/root-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/root-tree.c +1 -1
@@ -141,7 +141,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_rootint ret;int slot;unsigned long ptr; -int old_len; +u32 old_len; path =btrfs_alloc_path ();if (!path)
Signature · 1 line
2.5.0
Quoted 6 lines · Alexandru Moise
old_lenis used to store the return value ofbtrfs_item_size_nr(). The return value ofbtrfs_item_size_nr()is of type u32. To improve code correctness and avoid mixing signed and unsigned integers I've changedold_lento be of type u32 as well.Signed-off-by Alexandru Moise <[email protected]>
Reviewed-by David Sterba <[email protected]>