Skip to content

Commit 80ffb3c

Browse files
committed
Fix new incorrect error return from do_md_stop.
Recent commit c8c00a6 changed the exit paths in do_md_stop and was not quite careful enough. There is one path were 'err' now needs to be cleared but it isn't. So setting an array to readonly (with mdadm --readonly) will work, but will incorrectly report and error: ENXIO. Signed-off-by: NeilBrown <[email protected]>
1 parent 4d484a4 commit 80ffb3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/md.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4364,6 +4364,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
43644364
if (mode == 1)
43654365
set_disk_ro(disk, 1);
43664366
clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
4367+
err = 0;
43674368
}
43684369
out:
43694370
mutex_unlock(&mddev->open_mutex);

0 commit comments

Comments
 (0)