@@ -510,26 +510,19 @@ cib_perform_op(enum cib_variant variant, cib__op_fn_t fn, xmlNode *req,
510510 pcmk__xe_copy_attrs (top , * cib , pcmk__xaf_none );
511511 old_versions = top ;
512512
513- pcmk__xml_commit_changes ((* cib )-> doc );
514- pcmk__xml_doc_set_flags ((* cib )-> doc , pcmk__xf_tracking );
515- if (enable_acl ) {
516- pcmk__enable_acl (* cib , * cib , user );
517- }
518-
519- rc = fn (op , call_options , section , req , input , cib , output );
520-
521513 } else {
522514 old_versions = * cib ;
523515 * cib = pcmk__xml_copy (NULL , * cib );
516+ }
524517
525- pcmk__xml_doc_set_flags ((* cib )-> doc , pcmk__xf_tracking );
526- if (enable_acl ) {
527- pcmk__enable_acl (* cib , * cib , user );
528- }
529-
530- rc = fn (op , call_options , section , req , input , cib , output );
518+ pcmk__xml_commit_changes ((* cib )-> doc );
519+ pcmk__xml_doc_set_flags ((* cib )-> doc , pcmk__xf_tracking );
520+ if (enable_acl ) {
521+ pcmk__enable_acl (* cib , * cib , user );
531522 }
532523
524+ rc = fn (op , call_options , section , req , input , cib , output );
525+
533526 // Allow ourselves to make any additional necessary changes
534527 xml_acl_disable (* cib );
535528
0 commit comments