diff options
| -rw-r--r-- | fs/xfs/xfs_buf_item.c | 13 | ||||
| -rw-r--r-- | fs/xfs/xfs_trans_buf.c | 7 |
2 files changed, 15 insertions, 5 deletions
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index c48e60bd857d..77b09750e92c 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
| @@ -611,7 +611,7 @@ xfs_buf_item_unlock( | |||
| 611 | { | 611 | { |
| 612 | struct xfs_buf_log_item *bip = BUF_ITEM(lip); | 612 | struct xfs_buf_log_item *bip = BUF_ITEM(lip); |
| 613 | struct xfs_buf *bp = bip->bli_buf; | 613 | struct xfs_buf *bp = bip->bli_buf; |
| 614 | int aborted; | 614 | int aborted, clean, i; |
| 615 | uint hold; | 615 | uint hold; |
| 616 | 616 | ||
| 617 | /* Clear the buffer's association with this transaction. */ | 617 | /* Clear the buffer's association with this transaction. */ |
| @@ -654,8 +654,15 @@ xfs_buf_item_unlock( | |||
| 654 | * If the buf item isn't tracking any data, free it, otherwise drop the | 654 | * If the buf item isn't tracking any data, free it, otherwise drop the |
| 655 | * reference we hold to it. | 655 | * reference we hold to it. |
| 656 | */ | 656 | */ |
| 657 | if (xfs_bitmap_empty(bip->__bli_format.blf_data_map, | 657 | clean = 1; |
| 658 | bip->__bli_format.blf_map_size)) | 658 | for (i = 0; i < bip->bli_format_count; i++) { |
| 659 | if (!xfs_bitmap_empty(bip->bli_formats[i].blf_data_map, | ||
| 660 | bip->bli_formats[i].blf_map_size)) { | ||
| 661 | clean = 0; | ||
| 662 | break; | ||
| 663 | } | ||
| 664 | } | ||
| 665 | if (clean) | ||
| 659 | xfs_buf_item_relse(bp); | 666 | xfs_buf_item_relse(bp); |
| 660 | else | 667 | else |
| 661 | atomic_dec(&bip->bli_refcount); | 668 | atomic_dec(&bip->bli_refcount); |
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index f7510bf68284..3edf5dbee001 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
| @@ -643,6 +643,7 @@ xfs_trans_binval( | |||
| 643 | xfs_buf_t *bp) | 643 | xfs_buf_t *bp) |
| 644 | { | 644 | { |
| 645 | xfs_buf_log_item_t *bip = bp->b_fspriv; | 645 | xfs_buf_log_item_t *bip = bp->b_fspriv; |
| 646 | int i; | ||
| 646 | 647 | ||
| 647 | ASSERT(bp->b_transp == tp); | 648 | ASSERT(bp->b_transp == tp); |
| 648 | ASSERT(bip != NULL); | 649 | ASSERT(bip != NULL); |
| @@ -670,8 +671,10 @@ xfs_trans_binval( | |||
| 670 | bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY); | 671 | bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY); |
| 671 | bip->__bli_format.blf_flags &= ~XFS_BLF_INODE_BUF; | 672 | bip->__bli_format.blf_flags &= ~XFS_BLF_INODE_BUF; |
| 672 | bip->__bli_format.blf_flags |= XFS_BLF_CANCEL; | 673 | bip->__bli_format.blf_flags |= XFS_BLF_CANCEL; |
| 673 | memset((char *)(bip->__bli_format.blf_data_map), 0, | 674 | for (i = 0; i < bip->bli_format_count; i++) { |
| 674 | (bip->__bli_format.blf_map_size * sizeof(uint))); | 675 | memset(bip->bli_formats[i].blf_data_map, 0, |
| 676 | (bip->bli_formats[i].blf_map_size * sizeof(uint))); | ||
| 677 | } | ||
| 675 | bip->bli_item.li_desc->lid_flags |= XFS_LID_DIRTY; | 678 | bip->bli_item.li_desc->lid_flags |= XFS_LID_DIRTY; |
| 676 | tp->t_flags |= XFS_TRANS_DIRTY; | 679 | tp->t_flags |= XFS_TRANS_DIRTY; |
| 677 | } | 680 | } |
