aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/bitmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 831aed9c56ff..c14dacdacfac 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1045,7 +1045,8 @@ void bitmap_daemon_work(struct bitmap *bitmap)
1045 if (bitmap == NULL) 1045 if (bitmap == NULL)
1046 return; 1046 return;
1047 if (time_before(jiffies, bitmap->daemon_lastrun + bitmap->daemon_sleep*HZ)) 1047 if (time_before(jiffies, bitmap->daemon_lastrun + bitmap->daemon_sleep*HZ))
1048 return; 1048 goto done;
1049
1049 bitmap->daemon_lastrun = jiffies; 1050 bitmap->daemon_lastrun = jiffies;
1050 if (bitmap->allclean) { 1051 if (bitmap->allclean) {
1051 bitmap->mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT; 1052 bitmap->mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
@@ -1142,6 +1143,7 @@ void bitmap_daemon_work(struct bitmap *bitmap)
1142 } 1143 }
1143 } 1144 }
1144 1145
1146 done:
1145 if (bitmap->allclean == 0) 1147 if (bitmap->allclean == 0)
1146 bitmap->mddev->thread->timeout = bitmap->daemon_sleep * HZ; 1148 bitmap->mddev->thread->timeout = bitmap->daemon_sleep * HZ;
1147} 1149}