MD: fix invalid stored role for a disk - try2
authorShaohua Li <shli@fb.com>
Mon, 15 Oct 2018 00:05:07 +0000 (17:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:17:05 +0000 (11:17 -0800)
commit627ab1faa16bab6183f94fbfc300d61590603b05
tree128166b008557ef7047333964428f14beebbcd36
parentf3bc71fa0e6a9f4c3293f73f1cdd4d8ebf0f013e
MD: fix invalid stored role for a disk - try2

commit 9e753ba9b9b405e3902d9f08aec5f2ea58a0c317 upstream.

Commit d595567dc4f0 (MD: fix invalid stored role for a disk) broke linear
hotadd. Let's only fix the role for disks in raid1/10.
Based on Guoqing's original patch.

Reported-by: kernel test robot <rong.a.chen@intel.com>
Cc: Gioh Kim <gi-oh.kim@profitbricks.com>
Cc: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/md.c
drivers/md/raid1.c
drivers/md/raid10.c