Skip to contentSkip to conversation

btrfs: declare rsv_count as unsigned int instead of int

PATCH In review Alexandru Moise 2 participants 2 messages Sep 22, 2015 – Sep 23, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/2 btrfs: declare rsv_count as unsigned int instead of int

rsv_count ultimately gets passed to start_transaction() which now takes an unsigned int as its num_items parameter. The value of rsv_count should always be positive so declare it as being unsigned.

---
v2: followed dave's suggestions of all num_items equivalents to be unsigned ints.

 fs/btrfs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/file.c +1 -1
index b823fac..6af5103 100644
@@ -2266,7 +2266,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len)
 	u64 drop_end;
 	int ret = 0;
 	int err = 0;
-	int rsv_count;
+	unsigned int rsv_count;
 	bool same_page;
 	bool no_holes = btrfs_fs_incompat(root->fs_info, NO_HOLES);
 	u64 ino_size;
Signature · 1 line
2.5.3