FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
/* Free the transaction object for transaction TXN_ID, and remove it
   from the transaction list of filesystem FS (which must already be
   locked via the txn_list_lock mutex).  Do nothing if the transaction
   does not exist. */
Free the transaction object for transaction TXN_ID, and remove it
from the transaction list of filesystem FS (which must already be
locked via the txn_list_lock mutex).  Do nothing if the transaction
does not exist.
Free the transaction object for transaction TXN_ID and remove it from the transaction list of filesystem FS ( which must already be locked via the txn_list_lock mutex ) . Do nothing if the transaction does not exist .
static void
free_shared_txn(svn_fs_t *fs, const svn_fs_fs__id_part_t *txn_id)
{
  fs_fs_data_t *ffd = fs->fsap_data;
  fs_fs_shared_data_t *ffsd = ffd->shared;
  fs_fs_shared_txn_data_t *txn, *prev = NULL;
  for (txn = ffsd->txns; txn; prev = txn, txn = txn->next)
    if (svn_fs_fs__id_part_eq(&txn->txn_id, txn_id))
      break;
  if (!txn)
    return;
  if (prev)
    prev->next = txn->next;
  else
    ffsd->txns = txn->next;
  if (!ffsd->free_txn)
    ffsd->free_txn = txn;
  else
    svn_pool_destroy(txn->pool);
}
static void free_shared_txn ( svn_fs_t * fs , const svn_fs_fs__id_part_t * txn_id ) { fs_fs_data_t * ffd = fs -> fsap_data ; fs_fs_shared_data_t * ffsd = ffd -> shared ; fs_fs_shared_txn_data_t * txn , * prev = NULL ; for ( txn = ffsd -> txns ; txn ; prev = txn , txn = txn -> next ) if ( svn_fs_fs__id_part_eq ( & txn -> txn_id , txn_id ) ) break ; if ( ! txn ) return ; if ( prev ) prev -> next = txn -> next ; else ffsd -> txns = txn -> next ; if ( ! ffsd -> free_txn ) ffsd -> free_txn = txn ; else svn_pool_destroy ( txn -> pool ) ; }
Free the transaction object for transaction TXN_ID, and remove it
from the transaction list of filesystem FS (which must already be
locked via the txn_list_lock mutex).
Free the transaction object for transaction TXN_ID and remove it from the transaction list of filesystem FS ( which must already be locked via the txn_list_lock mutex ) .
/* As we typically will be dealing with one transaction after another,
     we will maintain a single-object free list so that we can hopefully
     keep reusing the same transaction object. */