diff options
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r-- | drivers/md/dm-thin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 493478989dbd..0f781451ea3f 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/device-mapper.h> | 11 | #include <linux/device-mapper.h> |
12 | #include <linux/dm-io.h> | 12 | #include <linux/dm-io.h> |
13 | #include <linux/dm-kcopyd.h> | 13 | #include <linux/dm-kcopyd.h> |
14 | #include <linux/jiffies.h> | ||
14 | #include <linux/log2.h> | 15 | #include <linux/log2.h> |
15 | #include <linux/list.h> | 16 | #include <linux/list.h> |
16 | #include <linux/rculist.h> | 17 | #include <linux/rculist.h> |
@@ -1700,8 +1701,8 @@ static void process_cell_fail(struct thin_c *tc, struct dm_bio_prison_cell *cell | |||
1700 | */ | 1701 | */ |
1701 | static int need_commit_due_to_time(struct pool *pool) | 1702 | static int need_commit_due_to_time(struct pool *pool) |
1702 | { | 1703 | { |
1703 | return jiffies < pool->last_commit_jiffies || | 1704 | return !time_in_range(jiffies, pool->last_commit_jiffies, |
1704 | jiffies > pool->last_commit_jiffies + COMMIT_PERIOD; | 1705 | pool->last_commit_jiffies + COMMIT_PERIOD); |
1705 | } | 1706 | } |
1706 | 1707 | ||
1707 | #define thin_pbd(node) rb_entry((node), struct dm_thin_endio_hook, rb_node) | 1708 | #define thin_pbd(node) rb_entry((node), struct dm_thin_endio_hook, rb_node) |