diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-02-15 12:03:23 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-02-20 12:33:12 -0500 |
commit | eacd9aa8cedeb412842c7b339adbaa0477fdd5ad (patch) | |
tree | 12212663d52b32a50f9b5745d3c390496cbc499f /tools/perf/scripts/python/flamegraph.py | |
parent | 99668f618062816ca7ba639b007eb145b9d3d41e (diff) |
fix handling of nd->depth on LOOKUP_CACHED failures in try_to_unlazy*
After switching to non-RCU mode, we want nd->depth to match the number
of entries in nd->stack[] that need eventual path_put().
legitimize_links() takes care of that on failures; unfortunately,
failure exits added for LOOKUP_CACHED do not.
We could add the logics for that into those failure exits, both in
try_to_unlazy() and in try_to_unlazy_next(), but since both checks
are immediately followed by legitimize_links() and there's no calls
of legitimize_links() other than those two... It's easier to
move the check (and required handling of nd->depth on failure) into
legitimize_links() itself.
[caught by Jens: ... and since we are zeroing ->depth here, we need
to do drop_links() first]
Fixes: 6c6ec2b0a3e0 "fs: add support for LOOKUP_CACHED"
Tested-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions