md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop
authorNeilBrown <neilb@suse.com>
Thu, 6 Apr 2017 03:16:33 +0000 (11:16 +0800)
committerShaohua Li <shli@fb.com>
Mon, 10 Apr 2017 17:47:50 +0000 (10:47 -0700)
commit065e519e71b2c1f41936cce75b46b5ab34adb588
treeb5319795c0ae9aa20c0bae916b2d13f8a6f384be
parent6f287ca6046edd34ed83aafb7f9033c9c2e809e2
md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop

if called md_set_readonly and set MD_CLOSING bit, the mddev cannot
be opened any more due to the MD_CLOING bit wasn't cleared. Thus it
needs to be cleared in md_ioctl after any call to md_set_readonly()
or do_md_stop().

Signed-off-by: NeilBrown <neilb@suse.com>
Fixes: af8d8e6f0315 ("md: changes for MD_STILL_CLOSED flag")
Cc: stable@vger.kernel.org (v4.9+)
Signed-off-by: Zhilong Liu <zlliu@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md.c