Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1211612 > unrolled thread

[PATCH] btrfs: Fixed dsize and last_off declarations

Started byAlexandru Moise <00moses.alexander00@gmail.com>
First post2015-08-23 15:10 +0200
Last post2015-08-27 14:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] btrfs: Fixed dsize and last_off declarations Alexandru Moise <00moses.alexander00@gmail.com> - 2015-08-23 15:10 +0200
    Re: [PATCH] btrfs: Fixed dsize and last_off declarations David Sterba <dsterba@suse.cz> - 2015-08-27 14:00 +0200

#1211612 — [PATCH] btrfs: Fixed dsize and last_off declarations

FromAlexandru Moise <00moses.alexander00@gmail.com>
Date2015-08-23 15:10 +0200
Subject[PATCH] btrfs: Fixed dsize and last_off declarations
Message-ID<q0Dc6-1FU-13@gated-at.bofh.it>
The return values of btrfs_item_offset_nr and btrfs_item_size_nr are of
type u32. To avoid mixing signed and unsigned integers we should also
declare dsize and last_off to be of type u32.

Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
---
 fs/btrfs/ctree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 54114b4..4ff739e 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -4938,8 +4938,8 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
 {
 	struct extent_buffer *leaf;
 	struct btrfs_item *item;
-	int last_off;
-	int dsize = 0;
+	u32 last_off;
+	u32 dsize = 0;
 	int ret = 0;
 	int wret;
 	int i;
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1214490

FromDavid Sterba <dsterba@suse.cz>
Date2015-08-27 14:00 +0200
Message-ID<q240y-3yH-15@gated-at.bofh.it>
In reply to#1211612
On Sun, Aug 23, 2015 at 04:01:42PM +0000, Alexandru Moise wrote:
> The return values of btrfs_item_offset_nr and btrfs_item_size_nr are of
> type u32. To avoid mixing signed and unsigned integers we should also
> declare dsize and last_off to be of type u32.
> 
> Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>

Reviewed-by: David Sterba <dsterba@suse.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web