diff options
Diffstat (limited to 'drivers/md/dm-exception-store.c')
-rw-r--r-- | drivers/md/dm-exception-store.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c index 002417da1224..99cdffa7fbfe 100644 --- a/drivers/md/dm-exception-store.c +++ b/drivers/md/dm-exception-store.c | |||
@@ -536,6 +536,16 @@ static void persistent_commit(struct exception_store *store, | |||
536 | if (r) | 536 | if (r) |
537 | ps->valid = 0; | 537 | ps->valid = 0; |
538 | 538 | ||
539 | /* | ||
540 | * Have we completely filled the current area ? | ||
541 | */ | ||
542 | if (ps->current_committed == ps->exceptions_per_area) { | ||
543 | ps->current_committed = 0; | ||
544 | r = zero_area(ps, ps->current_area + 1); | ||
545 | if (r) | ||
546 | ps->valid = 0; | ||
547 | } | ||
548 | |||
539 | for (i = 0; i < ps->callback_count; i++) { | 549 | for (i = 0; i < ps->callback_count; i++) { |
540 | cb = ps->callbacks + i; | 550 | cb = ps->callbacks + i; |
541 | cb->callback(cb->context, r == 0 ? 1 : 0); | 551 | cb->callback(cb->context, r == 0 ? 1 : 0); |
@@ -543,16 +553,6 @@ static void persistent_commit(struct exception_store *store, | |||
543 | 553 | ||
544 | ps->callback_count = 0; | 554 | ps->callback_count = 0; |
545 | } | 555 | } |
546 | |||
547 | /* | ||
548 | * Have we completely filled the current area ? | ||
549 | */ | ||
550 | if (ps->current_committed == ps->exceptions_per_area) { | ||
551 | ps->current_committed = 0; | ||
552 | r = zero_area(ps, ps->current_area + 1); | ||
553 | if (r) | ||
554 | ps->valid = 0; | ||
555 | } | ||
556 | } | 556 | } |
557 | 557 | ||
558 | static void persistent_drop(struct exception_store *store) | 558 | static void persistent_drop(struct exception_store *store) |