aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2010-10-29 15:14:31 -0400
committerChris Mason <chris.mason@oracle.com>2010-10-29 15:14:31 -0400
commit411fc6bcef54f828a5458f4730c68abdf13c6bf0 (patch)
tree89b91cd7e0d7633e9d6e386e388bd0493165f66c /fs/btrfs/inode.c
parentd0b678cb0a26783ab7238784f1e7e608e5caafa3 (diff)
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>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 9f08136b10c4..0aa24717cd58 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1389,7 +1389,7 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset,
1389 1389
1390 if (map_length < length + size) 1390 if (map_length < length + size)
1391 return 1; 1391 return 1;
1392 return 0; 1392 return ret;
1393} 1393}
1394 1394
1395/* 1395/*
@@ -2709,8 +2709,8 @@ static int check_path_shared(struct btrfs_root *root,
2709{ 2709{
2710 struct extent_buffer *eb; 2710 struct extent_buffer *eb;
2711 int level; 2711 int level;
2712 int ret;
2713 u64 refs = 1; 2712 u64 refs = 1;
2713 int uninitialized_var(ret);
2714 2714
2715 for (level = 0; level < BTRFS_MAX_LEVEL; level++) { 2715 for (level = 0; level < BTRFS_MAX_LEVEL; level++) {
2716 if (!path->nodes[level]) 2716 if (!path->nodes[level])
@@ -2723,7 +2723,7 @@ static int check_path_shared(struct btrfs_root *root,
2723 if (refs > 1) 2723 if (refs > 1)
2724 return 1; 2724 return 1;
2725 } 2725 }
2726 return 0; 2726 return ret; /* XXX callers? */
2727} 2727}
2728 2728
2729/* 2729/*