summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2019-02-09 07:52:54 +0300
committerJens Axboe <axboe@kernel.dk>2019-02-09 17:18:31 +0300
commit83ff9318c44babe32da0947d81443bad82da2d44 (patch)
treecfef8628087b108de2e1c8bbf82fabfaa92b3cc9 /tools/perf/scripts/python/stackcollapse.py
parent9951379b0ca88c95876ad9778b9099e19a95d566 (diff)
downloadlinux-83ff9318c44babe32da0947d81443bad82da2d44.tar.xz
bcache: not use hard coded memset size in bch_cache_accounting_clear()
In stats.c:bch_cache_accounting_clear(), a hard coded number '7' is used in memset(). It is because in struct cache_stats, there are 7 atomic_t type members. This is not good when new members added into struct stats, the hard coded number will only clear part of memory. This patch replaces 'sizeof(unsigned long) * 7' by more generic 'sizeof(struct cache_stats))', to avoid potential error if new member added into struct cache_stats. Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions