summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-02-24 18:57:18 +0100
committerChris Mason <clm@fb.com>2015-03-02 14:04:45 -0800
commit1932b7be973b554ffe20a5bba6ffaed6fa995cdc (patch)
tree7ac067e4c7643336d9e58335eb7b36c4761c4646 /fs/btrfs/inode.c
parent5cdf83edb8e41cad1ec8eab2d402b4f9d9eb7ee0 (diff)
downloadop-kernel-dev-1932b7be973b554ffe20a5bba6ffaed6fa995cdc.zip
op-kernel-dev-1932b7be973b554ffe20a5bba6ffaed6fa995cdc.tar.gz
btrfs: fix lost return value due to variable shadowing
A block-local variable stores error code but btrfs_get_blocks_direct may not return it in the end as there's a ret defined in the function scope. CC: <stable@vger.kernel.org> # 3.6+ Fixes: d187663ef24c ("Btrfs: lock extents as we map them in DIO") Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 8564d8c..91a87f5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7288,7 +7288,6 @@ static int btrfs_get_blocks_direct(struct inode *inode, sector_t iblock,
((BTRFS_I(inode)->flags & BTRFS_INODE_NODATACOW) &&
em->block_start != EXTENT_MAP_HOLE)) {
int type;
- int ret;
u64 block_start, orig_start, orig_block_len, ram_bytes;
if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags))
OpenPOWER on IntegriCloud