summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorGuoqing Jiang <guoqing.jiang@cloud.ionos.com>2020-04-04 23:57:10 +0200
committerSong Liu <songliubraving@fb.com>2020-05-13 11:22:31 -0700
commit78b990cf2822d1150a419c13be48e74aefa83f27 (patch)
tree6191147cd6a3b8e71ba18f3c47e1aa1a8220fa04 /drivers/md
parentf6766ff6afff70e2aaf39e1511e16d471de7c3ae (diff)
downloadlinux-78b990cf2822d1150a419c13be48e74aefa83f27.tar.bz2
md: flush md_rdev_misc_wq for HOT_ADD_DISK case
Since rdev->kobj is removed asynchronously, it is possible that the rdev->kobj still exists when try to add the rdev again after rdev is removed. But this path md_ioctl (HOT_ADD_DISK) -> hot_add_disk -> bind_rdev_to_array missed it. Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com> Signed-off-by: Song Liu <songliubraving@fb.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index f5dfa503fb6f..95b72e35b355 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7512,7 +7512,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
}
- if (cmd == ADD_NEW_DISK)
+ if (cmd == ADD_NEW_DISK || cmd == HOT_ADD_DISK)
flush_rdev_wq(mddev);
if (cmd == HOT_REMOVE_DISK)