| 101 | } |
| 102 | |
| 103 | int flock_release(struct reftable_flock *l) |
| 104 | { |
| 105 | struct lock_file *lockfile = l->priv; |
| 106 | int ret; |
| 107 | |
| 108 | if (!lockfile) |
| 109 | return 0; |
| 110 | |
| 111 | ret = rollback_lock_file(lockfile); |
| 112 | reftable_free(lockfile); |
| 113 | *l = REFTABLE_FLOCK_INIT; |
| 114 | if (ret < 0) |
| 115 | return REFTABLE_IO_ERROR; |
| 116 | |
| 117 | return 0; |
| 118 | } |
| 119 | |
| 120 | int flock_commit(struct reftable_flock *l) |
| 121 | { |
no test coverage detected