diff options
| author | Christian Hopps <chopps@labn.net> | 2023-06-14 09:32:16 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-06-18 16:17:46 -0400 |
| commit | 04b4ede097c94f04cc1d14ce90ee82e35a63d670 (patch) | |
| tree | 00651cd710ee6eadabc0c8258e4c47b8e70d0775 /mgmtd/mgmt_history.c | |
| parent | f8500d484997f34d0484488216c98017745f1a37 (diff) | |
mgmtd: simplify locking, removing read locks
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'mgmtd/mgmt_history.c')
| -rw-r--r-- | mgmtd/mgmt_history.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mgmtd/mgmt_history.c b/mgmtd/mgmt_history.c index 54eb45fdf4..89a7a60166 100644 --- a/mgmtd/mgmt_history.c +++ b/mgmtd/mgmt_history.c @@ -211,7 +211,7 @@ static int mgmt_history_rollback_to_cmt(struct vty *vty, return -1; } - ret = mgmt_ds_write_lock(dst_ds_ctx); + ret = mgmt_ds_lock(dst_ds_ctx, vty->mgmt_session_id); if (ret != 0) { vty_out(vty, "Failed to lock the DS %u for rollback Reason: %s!\n", @@ -243,6 +243,8 @@ static int mgmt_history_rollback_to_cmt(struct vty *vty, mgmt_history_dump_cmt_record_index(); + /* XXX chopps when does this get unlocked? */ + /* * Block the rollback command from returning till the rollback * is completed. On rollback completion mgmt_history_rollback_complete() |
