]> git.baikalelectronics.ru Git - kernel.git/commit
md/r5cache: call mddev_lock/unlock() in r5c_journal_mode_show
authorSong Liu <songliubraving@fb.com>
Wed, 9 Aug 2017 05:56:52 +0000 (22:56 -0700)
committerShaohua Li <shli@fb.com>
Fri, 25 Aug 2017 17:21:46 +0000 (10:21 -0700)
commitabeabb81fa5c161125b5edf2ef73b8e0239e2b20
treedb55f2260db6cb8f0bff001767148adaddda81fb
parenta11a7c5acf235ecb143e7f6c14f64298e314b28f
md/r5cache: call mddev_lock/unlock() in r5c_journal_mode_show

In r5c_journal_mode_show(), it is necessary to call mddev_lock()
before accessing conf and conf->log. Otherwise, the conf->log
may change (and become NULL).

Signed-off-by: Song Liu <songliubraving@fb.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid5-cache.c