return;
}
ACCESS_ONCE(trans->transaction->aborted) = errno;
+ /* Wake up anybody who may be waiting on this transaction */
+ wake_up(&root->fs_info->transaction_wait);
+ wake_up(&root->fs_info->transaction_blocked_wait);
__btrfs_std_error(root->fs_info, function, line, errno, NULL);
}
/*
static inline int is_transaction_blocked(struct btrfs_transaction *trans)
{
return (trans->state >= TRANS_STATE_BLOCKED &&
- trans->state < TRANS_STATE_UNBLOCKED);
+ trans->state < TRANS_STATE_UNBLOCKED &&
+ !trans->aborted);
}
/* wait for commit against the current transaction to become unblocked
spin_unlock(&root->fs_info->trans_lock);
wait_event(root->fs_info->transaction_wait,
- cur_trans->state >= TRANS_STATE_UNBLOCKED);
+ cur_trans->state >= TRANS_STATE_UNBLOCKED ||
+ cur_trans->aborted);
put_transaction(cur_trans);
} else {
spin_unlock(&root->fs_info->trans_lock);
struct btrfs_transaction *trans)
{
wait_event(root->fs_info->transaction_blocked_wait,
- trans->state >= TRANS_STATE_COMMIT_START);
+ trans->state >= TRANS_STATE_COMMIT_START ||
+ trans->aborted);
}
/*
struct btrfs_transaction *trans)
{
wait_event(root->fs_info->transaction_wait,
- trans->state >= TRANS_STATE_UNBLOCKED);
+ trans->state >= TRANS_STATE_UNBLOCKED ||
+ trans->aborted);
}
/*