diff options
author | 2015-05-19 12:49:50 -0700 | |
---|---|---|
committer | 2015-05-19 18:04:17 -0700 | |
commit | 2c2ed5aa0154c0be67f98c970de6b5587dbc045a (patch) | |
tree | 93a9be4a974851d8a164b621711f3721d5966d5d /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | Btrfs: fix race when reusing stale extent buffers that leads to BUG_ON (diff) | |
download | linux-dev-2c2ed5aa0154c0be67f98c970de6b5587dbc045a.tar.xz linux-dev-2c2ed5aa0154c0be67f98c970de6b5587dbc045a.zip |
btrfs: clear 'ret' in btrfs_check_shared() loop
btrfs_check_shared() is leaking a return value of '1' from
find_parent_nodes(). As a result, callers (in this case, extent_fiemap())
are told extents are shared when they are not. This in turn broke fiemap on
btrfs for kernels v3.18 and up.
The fix is simple - we just have to clear 'ret' after we are done processing
the results of find_parent_nodes().
It wasn't clear to me at first what was happening with return values in
btrfs_check_shared() and find_parent_nodes() - thanks to Josef for the help
on irc. I added documentation to both functions to make things more clear
for the next hacker who might come across them.
If we could queue this up for -stable too that would be great.
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions