aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2010-10-29 15:14:37 -0400
committerChris Mason <chris.mason@oracle.com>2010-10-29 15:14:37 -0400
commit559af8211433b8c0b20e6c43c61409cb9c9c2996 (patch)
tree702ebd4c4f5b610daa36f65d814a518356a9a46b /fs/btrfs/disk-io.c
parent411fc6bcef54f828a5458f4730c68abdf13c6bf0 (diff)
Btrfs: cleanup warnings from gcc 4.6 (nonbugs)
These are all the cases where a variable is set, but not read which are not bugs as far as I can see, but simply leftovers. Still needs more review. Found by gcc 4.6's new warnings Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Chris Mason <chris.mason@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 77e5dabfd45a..e163424c7fce 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -338,7 +338,6 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
338 struct extent_io_tree *tree; 338 struct extent_io_tree *tree;
339 u64 start = (u64)page->index << PAGE_CACHE_SHIFT; 339 u64 start = (u64)page->index << PAGE_CACHE_SHIFT;
340 u64 found_start; 340 u64 found_start;
341 int found_level;
342 unsigned long len; 341 unsigned long len;
343 struct extent_buffer *eb; 342 struct extent_buffer *eb;
344 int ret; 343 int ret;
@@ -369,8 +368,6 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
369 WARN_ON(1); 368 WARN_ON(1);
370 goto err; 369 goto err;
371 } 370 }
372 found_level = btrfs_header_level(eb);
373
374 csum_tree_block(root, eb, 0); 371 csum_tree_block(root, eb, 0);
375err: 372err:
376 free_extent_buffer(eb); 373 free_extent_buffer(eb);
@@ -543,11 +540,9 @@ int btrfs_congested_async(struct btrfs_fs_info *info, int iodone)
543 540
544static void run_one_async_start(struct btrfs_work *work) 541static void run_one_async_start(struct btrfs_work *work)
545{ 542{
546 struct btrfs_fs_info *fs_info;
547 struct async_submit_bio *async; 543 struct async_submit_bio *async;
548 544
549 async = container_of(work, struct async_submit_bio, work); 545 async = container_of(work, struct async_submit_bio, work);
550 fs_info = BTRFS_I(async->inode)->root->fs_info;
551 async->submit_bio_start(async->inode, async->rw, async->bio, 546 async->submit_bio_start(async->inode, async->rw, async->bio,
552 async->mirror_num, async->bio_flags, 547 async->mirror_num, async->bio_flags,
553 async->bio_offset); 548 async->bio_offset);
@@ -860,12 +855,8 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
860 u32 blocksize, u64 parent_transid) 855 u32 blocksize, u64 parent_transid)
861{ 856{
862 struct extent_buffer *buf = NULL; 857 struct extent_buffer *buf = NULL;
863 struct inode *btree_inode = root->fs_info->btree_inode;
864 struct extent_io_tree *io_tree;
865 int ret; 858 int ret;
866 859
867 io_tree = &BTRFS_I(btree_inode)->io_tree;
868
869 buf = btrfs_find_create_tree_block(root, bytenr, blocksize); 860 buf = btrfs_find_create_tree_block(root, bytenr, blocksize);
870 if (!buf) 861 if (!buf)
871 return NULL; 862 return NULL;
@@ -1387,7 +1378,6 @@ static int bio_ready_for_csum(struct bio *bio)
1387 u64 start = 0; 1378 u64 start = 0;
1388 struct page *page; 1379 struct page *page;
1389 struct extent_io_tree *io_tree = NULL; 1380 struct extent_io_tree *io_tree = NULL;
1390 struct btrfs_fs_info *info = NULL;
1391 struct bio_vec *bvec; 1381 struct bio_vec *bvec;
1392 int i; 1382 int i;
1393 int ret; 1383 int ret;
@@ -1406,7 +1396,6 @@ static int bio_ready_for_csum(struct bio *bio)
1406 buf_len = page->private >> 2; 1396 buf_len = page->private >> 2;
1407 start = page_offset(page) + bvec->bv_offset; 1397 start = page_offset(page) + bvec->bv_offset;
1408 io_tree = &BTRFS_I(page->mapping->host)->io_tree; 1398 io_tree = &BTRFS_I(page->mapping->host)->io_tree;
1409 info = BTRFS_I(page->mapping->host)->root->fs_info;
1410 } 1399 }
1411 /* are we fully contained in this bio? */ 1400 /* are we fully contained in this bio? */
1412 if (buf_len <= length) 1401 if (buf_len <= length)