diff options
author | Tim Shimmin <tes@sgi.com> | 2005-09-04 18:29:01 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-09-04 18:29:01 -0400 |
commit | efa092f3d4c60be7e81de515db9f06e5f8426afc (patch) | |
tree | 6955d8a48cb52effb2f2352fab34bdf2291acce3 /fs/xfs/xfs_trans_buf.c | |
parent | 0f9fffbcc1817c655d6dd40960ae2e0086b0f64f (diff) |
[XFS] Fixes a bug in the quota code when allocating a new dquot record
which can cause an extent hole to be filled and a free extent to be
processed. In this case, we make a few mistakes: forget to pass back the
transaction, forget to put a hold on the buffer and forget to add the buf
to the new transaction.
SGI-PV: 940366
SGI-Modid: xfs-linux:xfs-kern:23594a
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
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. |