linux/drivers/md/bcache
Coly Li 83ff9318c4 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>
2019-02-09 07:18:31 -07:00
..
alloc.c bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set 2018-10-08 08:19:56 -06:00
bcache.h bcache: option to automatically run gc thread after writeback 2018-12-13 08:15:54 -07:00
bset.c bcache: fix code comments style 2018-08-11 15:46:42 -06:00
bset.h bcache: style fixes for lines over 80 characters 2018-08-11 15:46:41 -06:00
btree.c bcache: add comment for cache_set->fill_iter 2018-12-13 08:15:54 -07:00
btree.h bcache: introduce force_wake_up_gc() 2018-12-13 08:15:54 -07:00
closure.c bcache: add missing SPDX header 2018-08-11 15:46:42 -06:00
closure.h bcache: fix typo in code comments of closure_return_with_destructor() 2018-10-08 08:19:43 -06:00
debug.c bcache: do not check if debug dentry is ERR or NULL explicitly on remove 2018-12-13 08:15:54 -07:00
debug.h bcache: add identifier names to arguments of function definitions 2018-08-11 15:46:41 -06:00
extents.c bcache: replace hard coded number with BUCKET_GC_GEN_MAX 2018-10-08 08:19:55 -06:00
extents.h bcache: add identifier names to arguments of function definitions 2018-08-11 15:46:41 -06:00
io.c bcache: fix typo 'succesfully' to 'successfully' 2018-08-11 15:46:42 -06:00
journal.c bcache: print number of keys in trace_bcache_journal_write 2018-12-13 08:15:54 -07:00
journal.h bcache: add identifier names to arguments of function definitions 2018-08-11 15:46:41 -06:00
Kconfig for-4.19/post-20180822 2018-08-22 13:38:05 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
movinggc.c bcache: style fix to add a blank line after declarations 2018-08-11 15:46:41 -06:00
request.c bcache: update comment for bch_data_insert 2018-12-13 08:15:54 -07:00
request.h bcache: remove unused bch_passthrough_cache 2018-10-08 08:19:52 -06:00
stats.c bcache: not use hard coded memset size in bch_cache_accounting_clear() 2019-02-09 07:18:31 -07:00
stats.h bcache: add identifier names to arguments of function definitions 2018-08-11 15:46:41 -06:00
super.c bcache: make cutoff_writeback and cutoff_writeback_sync tunable 2018-12-13 08:15:54 -07:00
sysfs.c bcache: set writeback_percent in a flexible range 2018-12-13 08:15:54 -07:00
sysfs.h bcache: replace Symbolic permissions by octal permission numbers 2018-08-11 15:46:41 -06:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
util.c for-4.19/post-20180822 2018-08-22 13:38:05 -07:00
util.h for-4.19/post-20180822 2018-08-22 13:38:05 -07:00
writeback.c bcache: option to automatically run gc thread after writeback 2018-12-13 08:15:54 -07:00
writeback.h bcache: never writeback a discard operation 2019-02-09 07:18:31 -07:00