aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-01-05 21:25:51 -0500
committerChris Mason <chris.mason@oracle.com>2009-01-05 21:25:51 -0500
commitd397712bcc6a759a560fd247e6053ecae091f958 (patch)
tree9da8daebb870d8b8b1843507c4621715e23dd31a /fs/btrfs/free-space-cache.c
parent1f3c79a28c8837e8572b98f6d14142d9a6133c56 (diff)
Btrfs: Fix checkpatch.pl warnings
There were many, most are fixed now. struct-funcs.c generates some warnings but these are bogus. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r--fs/btrfs/free-space-cache.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 2e69b9c30437..d1e5f0e84c58 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -213,10 +213,13 @@ static int __btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
213 info->offset = offset; 213 info->offset = offset;
214 info->bytes += bytes; 214 info->bytes += bytes;
215 } else if (right_info && right_info->offset != offset+bytes) { 215 } else if (right_info && right_info->offset != offset+bytes) {
216 printk(KERN_ERR "adding space in the middle of an existing " 216 printk(KERN_ERR "btrfs adding space in the middle of an "
217 "free space area. existing: offset=%Lu, bytes=%Lu. " 217 "existing free space area. existing: "
218 "new: offset=%Lu, bytes=%Lu\n", right_info->offset, 218 "offset=%llu, bytes=%llu. new: offset=%llu, "
219 right_info->bytes, offset, bytes); 219 "bytes=%llu\n", (unsigned long long)right_info->offset,
220 (unsigned long long)right_info->bytes,
221 (unsigned long long)offset,
222 (unsigned long long)bytes);
220 BUG(); 223 BUG();
221 } 224 }
222 225
@@ -225,11 +228,14 @@ static int __btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
225 228
226 if (unlikely((left_info->offset + left_info->bytes) != 229 if (unlikely((left_info->offset + left_info->bytes) !=
227 offset)) { 230 offset)) {
228 printk(KERN_ERR "free space to the left of new free " 231 printk(KERN_ERR "btrfs free space to the left "
229 "space isn't quite right. existing: offset=%Lu," 232 "of new free space isn't "
230 " bytes=%Lu. new: offset=%Lu, bytes=%Lu\n", 233 "quite right. existing: offset=%llu, "
231 left_info->offset, left_info->bytes, offset, 234 "bytes=%llu. new: offset=%llu, bytes=%llu\n",
232 bytes); 235 (unsigned long long)left_info->offset,
236 (unsigned long long)left_info->bytes,
237 (unsigned long long)offset,
238 (unsigned long long)bytes);
233 BUG(); 239 BUG();
234 } 240 }
235 241
@@ -265,8 +271,7 @@ out:
265 BUG(); 271 BUG();
266 } 272 }
267 273
268 if (alloc_info) 274 kfree(alloc_info);
269 kfree(alloc_info);
270 275
271 return ret; 276 return ret;
272} 277}
@@ -283,9 +288,11 @@ __btrfs_remove_free_space(struct btrfs_block_group_cache *block_group,
283 288
284 if (info && info->offset == offset) { 289 if (info && info->offset == offset) {
285 if (info->bytes < bytes) { 290 if (info->bytes < bytes) {
286 printk(KERN_ERR "Found free space at %Lu, size %Lu," 291 printk(KERN_ERR "Found free space at %llu, size %llu,"
287 "trying to use %Lu\n", 292 "trying to use %llu\n",
288 info->offset, info->bytes, bytes); 293 (unsigned long long)info->offset,
294 (unsigned long long)info->bytes,
295 (unsigned long long)bytes);
289 WARN_ON(1); 296 WARN_ON(1);
290 ret = -EINVAL; 297 ret = -EINVAL;
291 goto out; 298 goto out;
@@ -401,8 +408,6 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group,
401 info = rb_entry(n, struct btrfs_free_space, offset_index); 408 info = rb_entry(n, struct btrfs_free_space, offset_index);
402 if (info->bytes >= bytes) 409 if (info->bytes >= bytes)
403 count++; 410 count++;
404 //printk(KERN_INFO "offset=%Lu, bytes=%Lu\n", info->offset,
405 // info->bytes);
406 } 411 }
407 printk(KERN_INFO "%d blocks of free space at or bigger than bytes is" 412 printk(KERN_INFO "%d blocks of free space at or bigger than bytes is"
408 "\n", count); 413 "\n", count);