]> git.baikalelectronics.ru Git - kernel.git/commit
md: unlock mddev before reap sync_thread in action_store
authorGuoqing Jiang <guoqing.jiang@linux.dev>
Tue, 21 Jun 2022 03:11:29 +0000 (11:11 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:14:40 +0000 (17:14 -0600)
commit450b833a3a9c45f07a852594d1945517257f6dff
treeaa96ff045ce70790592c50d16d50bb95a185b264
parentfc82b80c721850fd2afcd2d7d52706be3a75d39b
md: unlock mddev before reap sync_thread in action_store

Since the bug which commit d0d1827b64334 ("md: don't unregister sync_thread
with reconfig_mutex held") fixed is related with action_store path, other
callers which reap sync_thread didn't need to be changed.

Let's pull md_unregister_thread from md_reap_sync_thread, then fix previous
bug with belows.

1. unlock mddev before md_reap_sync_thread in action_store.
2. save reshape_position before unlock, then restore it to ensure position
   not changed accidentally by others.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm-raid.c
drivers/md/md.c