md/r5cache: move mddev_lock() out of r5c_journal_mode_set()
authorSong Liu <songliubraving@fb.com>
Mon, 20 Nov 2017 06:17:00 +0000 (22:17 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:52:59 +0000 (09:52 +0100)
commit55b26ae24c64ee66188952daacb00aa33bd29407
treee56275093bebafec02a85061f85eded87c7db339
parent425704be0968368005eabbf5c68182a4d4b23c8b
md/r5cache: move mddev_lock() out of r5c_journal_mode_set()

commit ff35f58e8f8eb520367879a0ccc6f2ec4b62b17b upstream.

r5c_journal_mode_set() is called by r5c_journal_mode_store() and
raid_ctr() in dm-raid. We don't need mddev_lock() when calling from
raid_ctr(). This patch fixes this by moves the mddev_lock() to
r5c_journal_mode_store().

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid5-cache.c