diff options
Diffstat (limited to 'fs/xfs/xfs_trans_buf.c')
-rw-r--r-- | fs/xfs/xfs_trans_buf.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 8a0f6af51206..40871bf607f0 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
@@ -768,6 +768,9 @@ xfs_trans_buf_set_type( | |||
768 | { | 768 | { |
769 | struct xfs_buf_log_item *bip = bp->b_fspriv; | 769 | struct xfs_buf_log_item *bip = bp->b_fspriv; |
770 | 770 | ||
771 | if (!tp) | ||
772 | return; | ||
773 | |||
771 | ASSERT(bp->b_transp == tp); | 774 | ASSERT(bp->b_transp == tp); |
772 | ASSERT(bip != NULL); | 775 | ASSERT(bip != NULL); |
773 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 776 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
@@ -777,6 +780,20 @@ xfs_trans_buf_set_type( | |||
777 | bip->__bli_format.blf_flags |= type; | 780 | bip->__bli_format.blf_flags |= type; |
778 | } | 781 | } |
779 | 782 | ||
783 | void | ||
784 | xfs_trans_buf_copy_type( | ||
785 | struct xfs_buf *dst_bp, | ||
786 | struct xfs_buf *src_bp) | ||
787 | { | ||
788 | struct xfs_buf_log_item *sbip = src_bp->b_fspriv; | ||
789 | struct xfs_buf_log_item *dbip = dst_bp->b_fspriv; | ||
790 | uint type; | ||
791 | |||
792 | type = sbip->__bli_format.blf_flags & XFS_BLF_TYPE_MASK; | ||
793 | dbip->__bli_format.blf_flags &= ~XFS_BLF_TYPE_MASK; | ||
794 | dbip->__bli_format.blf_flags |= type; | ||
795 | } | ||
796 | |||
780 | /* | 797 | /* |
781 | * Similar to xfs_trans_inode_buf(), this marks the buffer as a cluster of | 798 | * Similar to xfs_trans_inode_buf(), this marks the buffer as a cluster of |
782 | * dquots. However, unlike in inode buffer recovery, dquot buffers get | 799 | * dquots. However, unlike in inode buffer recovery, dquot buffers get |