diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2023-11-08 09:18:27 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-08 09:18:27 -0500 | 
| commit | 85a80ba5aab3bb0fdffe6b17de8b5c09de66d985 (patch) | |
| tree | 22be7e2e1b8ba2d4c4f436f40eccb11283337e14 /mgmtd/mgmt_txn.c | |
| parent | fb9a27b5faf778254f64f91567115cd73152c5a1 (diff) | |
| parent | a962f2949f3c60fdc15a9d9d45fb81eb3cf18828 (diff) | |
Merge pull request #14544 from idryzhov/mgmt-scratch-buffer
mgmt: delete candidate scratch buffer
Diffstat (limited to 'mgmtd/mgmt_txn.c')
| -rw-r--r-- | mgmtd/mgmt_txn.c | 24 | 
1 files changed, 5 insertions, 19 deletions
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c index c5bd73e74b..52d24be77d 100644 --- a/mgmtd/mgmt_txn.c +++ b/mgmtd/mgmt_txn.c @@ -1193,25 +1193,11 @@ static int mgmt_txn_prepare_config(struct mgmt_txn_ctx *txn)  		goto mgmt_txn_prepare_config_done;  	} -	/* -	 * Check for diffs from scratch buffer. If found empty -	 * get the diff from Candidate DS itself. -	 */ -	cfg_chgs = &nb_config->cfg_chgs; -	if (RB_EMPTY(nb_config_cbs, cfg_chgs)) { -		/* -		 * This could be the case when the config is directly -		 * loaded onto the candidate DS from a file. Get the -		 * diff from a full comparison of the candidate and -		 * running DSs. -		 */ -		nb_config_diff(mgmt_ds_get_nb_config( -				       txn->commit_cfg_req->req.commit_cfg -					       .dst_ds_ctx), -			       nb_config, &changes); -		cfg_chgs = &changes; -		del_cfg_chgs = true; -	} +	nb_config_diff(mgmt_ds_get_nb_config(txn->commit_cfg_req->req.commit_cfg +					     .dst_ds_ctx), +		       nb_config, &changes); +	cfg_chgs = &changes; +	del_cfg_chgs = true;  	if (RB_EMPTY(nb_config_cbs, cfg_chgs)) {  		/*  | 
