btrfs: fix lost return value due to variable shadowing
authorDavid Sterba <dsterba@suse.cz>
Tue, 24 Feb 2015 17:57:18 +0000 (18:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 12:22:29 +0000 (13:22 +0100)
commita042770a1f4fb346e360cbde61426288efb71688
treeb0fbceb150d11449eb3b51d05d433982d3a5f485
parentb5e10b06c525414503cd40b536604b0167c062e6
btrfs: fix lost return value due to variable shadowing

commit 1932b7be973b554ffe20a5bba6ffaed6fa995cdc upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/inode.c