diff options
author | NeilBrown <neilb@suse.de> | 2013-08-08 01:20:32 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-08-27 08:05:43 +0200 |
commit | 275c51c4e34ed776d40a99dd97c1deee50303b07 (patch) | |
tree | 1ca30249554d361036b4aee4edb92bc2aaffe050 /drivers/md/md.c | |
parent | md: don't call md_allow_write in get_bitmap_file. (diff) | |
download | linux-275c51c4e34ed776d40a99dd97c1deee50303b07.tar.xz linux-275c51c4e34ed776d40a99dd97c1deee50303b07.zip |
md: fix safe_mode buglet.
Whe we set the safe_mode_timeout to a smaller value we trigger a timeout
immediately - otherwise the small value might not be honoured.
However if the previous timeout was 0 meaning "no timeout", we didn't.
This would mean that no timeout happens until the next write completes,
which could be a long time.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index bba87324c9b2..16b0822fa24a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3429,7 +3429,7 @@ safe_delay_store(struct mddev *mddev, const char *cbuf, size_t len) mddev->safemode_delay = (msec*HZ)/1000; if (mddev->safemode_delay == 0) mddev->safemode_delay = 1; - if (mddev->safemode_delay < old_delay) + if (mddev->safemode_delay < old_delay || old_delay == 0) md_safemode_timeout((unsigned long)mddev); } return len; |