diff options
Diffstat (limited to 'fs/xfs/xfs_trans_buf.c')
| -rw-r--r-- | fs/xfs/xfs_trans_buf.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 144da7a85466..e733293dd7f4 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
| @@ -714,6 +714,29 @@ xfs_trans_bhold(xfs_trans_t *tp, | |||
| 714 | } | 714 | } |
| 715 | 715 | ||
| 716 | /* | 716 | /* |
| 717 | * Cancel the previous buffer hold request made on this buffer | ||
| 718 | * for this transaction. | ||
| 719 | */ | ||
| 720 | void | ||
| 721 | xfs_trans_bhold_release(xfs_trans_t *tp, | ||
| 722 | xfs_buf_t *bp) | ||
| 723 | { | ||
| 724 | xfs_buf_log_item_t *bip; | ||
| 725 | |||
| 726 | ASSERT(XFS_BUF_ISBUSY(bp)); | ||
| 727 | ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp); | ||
| 728 | ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL); | ||
| 729 | |||
| 730 | bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *); | ||
| 731 | ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); | ||
| 732 | ASSERT(!(bip->bli_format.blf_flags & XFS_BLI_CANCEL)); | ||
| 733 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | ||
| 734 | ASSERT(bip->bli_flags & XFS_BLI_HOLD); | ||
| 735 | bip->bli_flags &= ~XFS_BLI_HOLD; | ||
| 736 | xfs_buf_item_trace("BHOLD RELEASE", bip); | ||
| 737 | } | ||
| 738 | |||
| 739 | /* | ||
| 717 | * This is called to mark bytes first through last inclusive of the given | 740 | * This is called to mark bytes first through last inclusive of the given |
| 718 | * buffer as needing to be logged when the transaction is committed. | 741 | * buffer as needing to be logged when the transaction is committed. |
| 719 | * The buffer must already be associated with the given transaction. | 742 | * The buffer must already be associated with the given transaction. |
