commit(): Make function more efficient

Change the logic of the commit function from searching
the journal for each metadata variable, to looking
for all metadata variables in each journal entry.
This change reduces the number of times that we search
through the journal from N to 1 time.

Change-Id: I47143e746dafb06bdce25dfd0009933494f4d25d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed