Skip to contentSkip to conversation

btrfs: fix lost return value due to variable shadowing

PATCH New David Sterba 1 participant 1 message Feb 24, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 <[email protected]> # 3.6+
Fixes d187663ef24c ("Btrfs: lock extents as we map them in DIO")
---
 fs/btrfs/inode.c | 1 -
 1 file changed, 1 deletion(-)
fs/btrfs/inode.c +0 -1
index 8564d8ce03de..91a87f53be3c 100644
@@ -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))
Signature · 1 line
1.8.4.5