]>
Commit | Line | Data |
---|---|---|
103e869f GKH |
1 | From 1932b7be973b554ffe20a5bba6ffaed6fa995cdc Mon Sep 17 00:00:00 2001 |
2 | From: David Sterba <dsterba@suse.cz> | |
3 | Date: Tue, 24 Feb 2015 18:57:18 +0100 | |
4 | Subject: btrfs: fix lost return value due to variable shadowing | |
5 | ||
6 | From: David Sterba <dsterba@suse.cz> | |
7 | ||
8 | commit 1932b7be973b554ffe20a5bba6ffaed6fa995cdc upstream. | |
9 | ||
10 | A block-local variable stores error code but btrfs_get_blocks_direct may | |
11 | not return it in the end as there's a ret defined in the function scope. | |
12 | ||
13 | Fixes: d187663ef24c ("Btrfs: lock extents as we map them in DIO") | |
14 | Signed-off-by: David Sterba <dsterba@suse.cz> | |
15 | Signed-off-by: Chris Mason <clm@fb.com> | |
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
17 | ||
18 | --- | |
19 | fs/btrfs/inode.c | 1 - | |
20 | 1 file changed, 1 deletion(-) | |
21 | ||
22 | --- a/fs/btrfs/inode.c | |
23 | +++ b/fs/btrfs/inode.c | |
24 | @@ -7208,7 +7208,6 @@ static int btrfs_get_blocks_direct(struc | |
25 | ((BTRFS_I(inode)->flags & BTRFS_INODE_NODATACOW) && | |
26 | em->block_start != EXTENT_MAP_HOLE)) { | |
27 | int type; | |
28 | - int ret; | |
29 | u64 block_start, orig_start, orig_block_len, ram_bytes; | |
30 | ||
31 | if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) |