summaryrefslogtreecommitdiff
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2016-03-31 12:06:52 -0700
committerJohn Stultz <john.stultz@linaro.org>2016-03-31 12:06:52 -0700
commitf44d1d1e146a6e2bf18890c70ebb5a84e6bf7272 (patch)
tree96501b89f8cf54a6c9f7f406da20981ed395cdcd /drivers/md/dm-snap.c
parente7d40d2bf8b2991f051734dd45a95385644f8147 (diff)
parent0d1912303e54ed1b2a371be0bba51c384dd57326 (diff)
Merge tag 'v4.4.6' into android-4.4-stable-merge
This is the 4.4.6 stable release Merge v4.4.6 into common/android-4.4 tree Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r--drivers/md/dm-snap.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index f68d0ae5b198..3766386080a4 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -1437,8 +1437,9 @@ static void __invalidate_snapshot(struct dm_snapshot *s, int err)
dm_table_event(s->ti->table);
}
-static void pending_complete(struct dm_snap_pending_exception *pe, int success)
+static void pending_complete(void *context, int success)
{
+ struct dm_snap_pending_exception *pe = context;
struct dm_exception *e;
struct dm_snapshot *s = pe->snap;
struct bio *origin_bios = NULL;
@@ -1506,24 +1507,13 @@ out:
free_pending_exception(pe);
}
-static void commit_callback(void *context, int success)
-{
- struct dm_snap_pending_exception *pe = context;
-
- pending_complete(pe, success);
-}
-
static void complete_exception(struct dm_snap_pending_exception *pe)
{
struct dm_snapshot *s = pe->snap;
- if (unlikely(pe->copy_error))
- pending_complete(pe, 0);
-
- else
- /* Update the metadata if we are persistent */
- s->store->type->commit_exception(s->store, &pe->e,
- commit_callback, pe);
+ /* Update the metadata if we are persistent */
+ s->store->type->commit_exception(s->store, &pe->e, !pe->copy_error,
+ pending_complete, pe);
}
/*