linux_old1/drivers/md/bcache
Coly Li 1c1a2ee1b5 bcache: return 0 from bch_debug_init() if CONFIG_DEBUG_FS=n
Commit 539d39eb27 ("bcache: fix wrong return value in bch_debug_init()")
returns the return value of debugfs_create_dir() to bcache_init(). When
CONFIG_DEBUG_FS=n, bch_debug_init() always returns 1 and makes
bcache_init() failedi.

This patch makes bch_debug_init() always returns 0 if CONFIG_DEBUG_FS=n,
so bcache can continue to work for the kernels which don't have debugfs
enanbled.

Changelog:
v4: Add Acked-by from Kent Overstreet.
v3: Use IS_ENABLED(CONFIG_DEBUG_FS) to replace #ifdef DEBUG_FS.
v2: Remove a warning information
v1: Initial version.

Fixes: Commit 539d39eb27 ("bcache: fix wrong return value in bch_debug_init()")
Cc: stable@vger.kernel.org
Signed-off-by: Coly Li <colyli@suse.de>
Reported-by: Massimo B. <massimo.b@gmx.net>
Reported-by: Kai Krakow <kai@kaishome.de>
Tested-by: Kai Krakow <kai@kaishome.de>
Acked-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-05-17 09:43:40 -06:00
..
Kconfig bcache: Kill dead cgroup code 2014-03-18 12:22:35 -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
alloc.c bcache: add wait_for_kthread_stop() in bch_allocator_thread() 2018-05-03 08:35:13 -06:00
bcache.h bcache: store disk name in struct cache and struct cached_dev 2018-05-03 08:35:08 -06:00
bset.c bcache: Suppress more warnings about set-but-not-used variables 2018-03-18 20:15:20 -06:00
bset.h bcache: Add __printf annotation to __bch_check_keys() 2018-03-18 20:15:20 -06:00
btree.c bcache: Fix kernel-doc warnings 2018-03-18 20:15:20 -06:00
btree.h Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block 2017-11-14 15:32:19 -08:00
closure.c bcache: Fix kernel-doc warnings 2018-03-18 20:15:20 -06:00
closure.h bcache: move closure debug file into debug directory 2018-03-18 20:15:20 -06:00
debug.c bcache: return 0 from bch_debug_init() if CONFIG_DEBUG_FS=n 2018-05-17 09:43:40 -06:00
debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extents.c bcache: Remove an unused variable 2018-03-18 20:15:20 -06:00
extents.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.c bcache: store disk name in struct cache and struct cached_dev 2018-05-03 08:35:08 -06:00
journal.c bcache: Reduce the number of sparse complaints about lock imbalances 2018-03-18 20:15:20 -06:00
journal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
movinggc.c block: move bio_alloc_pages() to bcache 2018-01-06 09:18:00 -07:00
request.c bcache: store disk name in struct cache and struct cached_dev 2018-05-03 08:35:08 -06:00
request.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stats.c md: Convert timers to use timer_setup() 2017-11-14 20:11:57 -07:00
stats.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
super.c bcache: use pr_info() to inform duplicated CACHE_SET_IO_DISABLE set 2018-05-03 08:35:16 -06:00
sysfs.c bcache: add io_disable to struct cached_dev 2018-03-18 20:15:20 -06:00
sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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 bcache: Fix kernel-doc warnings 2018-03-18 20:15:20 -06:00
util.h bcache: add CACHE_SET_IO_DISABLE to struct cache_set flags 2018-03-18 20:15:20 -06:00
writeback.c bcache: count backing device I/O error for writeback I/O 2018-05-03 08:35:12 -06:00
writeback.h bcache: Fix indentation 2018-03-18 20:15:20 -06:00