aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 22c7bff77ad2..d6928970097f 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -894,7 +894,7 @@ xfs_buf_lock(
894 trace_xfs_buf_lock(bp, _RET_IP_); 894 trace_xfs_buf_lock(bp, _RET_IP_);
895 895
896 if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE)) 896 if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE))
897 xfs_log_force(bp->b_mount, 0); 897 xfs_log_force(bp->b_target->bt_mount, 0);
898 if (atomic_read(&bp->b_io_remaining)) 898 if (atomic_read(&bp->b_io_remaining))
899 blk_run_address_space(bp->b_target->bt_mapping); 899 blk_run_address_space(bp->b_target->bt_mapping);
900 down(&bp->b_sema); 900 down(&bp->b_sema);
@@ -1017,7 +1017,6 @@ xfs_bwrite(
1017{ 1017{
1018 int error; 1018 int error;
1019 1019
1020 bp->b_mount = mp;
1021 bp->b_flags |= XBF_WRITE; 1020 bp->b_flags |= XBF_WRITE;
1022 bp->b_flags &= ~(XBF_ASYNC | XBF_READ); 1021 bp->b_flags &= ~(XBF_ASYNC | XBF_READ);
1023 1022
@@ -1038,8 +1037,6 @@ xfs_bdwrite(
1038{ 1037{
1039 trace_xfs_buf_bdwrite(bp, _RET_IP_); 1038 trace_xfs_buf_bdwrite(bp, _RET_IP_);
1040 1039
1041 bp->b_mount = mp;
1042
1043 bp->b_flags &= ~XBF_READ; 1040 bp->b_flags &= ~XBF_READ;
1044 bp->b_flags |= (XBF_DELWRI | XBF_ASYNC); 1041 bp->b_flags |= (XBF_DELWRI | XBF_ASYNC);
1045 1042
@@ -1128,7 +1125,7 @@ int
1128xfs_bdstrat_cb( 1125xfs_bdstrat_cb(
1129 struct xfs_buf *bp) 1126 struct xfs_buf *bp)
1130{ 1127{
1131 if (XFS_FORCED_SHUTDOWN(bp->b_mount)) { 1128 if (XFS_FORCED_SHUTDOWN(bp->b_target->bt_mount)) {
1132 trace_xfs_bdstrat_shut(bp, _RET_IP_); 1129 trace_xfs_bdstrat_shut(bp, _RET_IP_);
1133 /* 1130 /*
1134 * Metadata write that didn't get logged but 1131 * Metadata write that didn't get logged but
@@ -1644,6 +1641,7 @@ out_error:
1644 1641
1645xfs_buftarg_t * 1642xfs_buftarg_t *
1646xfs_alloc_buftarg( 1643xfs_alloc_buftarg(
1644 struct xfs_mount *mp,
1647 struct block_device *bdev, 1645 struct block_device *bdev,
1648 int external, 1646 int external,
1649 const char *fsname) 1647 const char *fsname)
@@ -1652,6 +1650,7 @@ xfs_alloc_buftarg(
1652 1650
1653 btp = kmem_zalloc(sizeof(*btp), KM_SLEEP); 1651 btp = kmem_zalloc(sizeof(*btp), KM_SLEEP);
1654 1652
1653 btp->bt_mount = mp;
1655 btp->bt_dev = bdev->bd_dev; 1654 btp->bt_dev = bdev->bd_dev;
1656 btp->bt_bdev = bdev; 1655 btp->bt_bdev = bdev;
1657 if (xfs_setsize_buftarg_early(btp, bdev)) 1656 if (xfs_setsize_buftarg_early(btp, bdev))