Btrfs: Fix variables set but not read (bugs found by gcc 4.6)

These are all the cases where a variable is set, but not
read which are really bugs.

- Couple of incorrect error handling fixed.
- One incorrect use of a allocation policy
- Some other things

Still needs more review.

Found by gcc 4.6's new warnings.

[akpm@linux-foundation.org: fix build.  Might have been bitrot]
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>
This commit is contained in:
Andi Kleen
2010-10-29 15:14:31 -04:00
committed by Chris Mason
parent d0b678cb0a
commit 411fc6bcef
5 changed files with 10 additions and 6 deletions

View File

@@ -2779,6 +2779,8 @@ int extent_prepare_write(struct extent_io_tree *tree,
NULL, 1,
end_bio_extent_preparewrite, 0,
0, 0);
if (ret && !err)
err = ret;
iocount++;
block_start = block_start + iosize;
} else {