diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 12 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.h | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 10 |
3 files changed, 16 insertions, 8 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index cb329edc925b..aa1016bb9134 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -34,6 +34,12 @@ | |||
34 | #include <linux/backing-dev.h> | 34 | #include <linux/backing-dev.h> |
35 | #include <linux/freezer.h> | 35 | #include <linux/freezer.h> |
36 | 36 | ||
37 | #include "xfs_sb.h" | ||
38 | #include "xfs_inum.h" | ||
39 | #include "xfs_ag.h" | ||
40 | #include "xfs_dmapi.h" | ||
41 | #include "xfs_mount.h" | ||
42 | |||
37 | static kmem_zone_t *xfs_buf_zone; | 43 | static kmem_zone_t *xfs_buf_zone; |
38 | STATIC int xfsbufd(void *); | 44 | STATIC int xfsbufd(void *); |
39 | STATIC int xfsbufd_wakeup(int, gfp_t); | 45 | STATIC int xfsbufd_wakeup(int, gfp_t); |
@@ -1435,10 +1441,12 @@ xfs_unregister_buftarg( | |||
1435 | 1441 | ||
1436 | void | 1442 | void |
1437 | xfs_free_buftarg( | 1443 | xfs_free_buftarg( |
1438 | xfs_buftarg_t *btp) | 1444 | struct xfs_mount *mp, |
1445 | struct xfs_buftarg *btp) | ||
1439 | { | 1446 | { |
1440 | xfs_flush_buftarg(btp, 1); | 1447 | xfs_flush_buftarg(btp, 1); |
1441 | xfs_blkdev_issue_flush(btp); | 1448 | if (mp->m_flags & XFS_MOUNT_BARRIER) |
1449 | xfs_blkdev_issue_flush(btp); | ||
1442 | xfs_free_bufhash(btp); | 1450 | xfs_free_bufhash(btp); |
1443 | iput(btp->bt_mapping->host); | 1451 | iput(btp->bt_mapping->host); |
1444 | 1452 | ||
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 288ae7c4c800..9b4d666ad31f 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -413,7 +413,7 @@ static inline int XFS_bwrite(xfs_buf_t *bp) | |||
413 | * Handling of buftargs. | 413 | * Handling of buftargs. |
414 | */ | 414 | */ |
415 | extern xfs_buftarg_t *xfs_alloc_buftarg(struct block_device *, int); | 415 | extern xfs_buftarg_t *xfs_alloc_buftarg(struct block_device *, int); |
416 | extern void xfs_free_buftarg(xfs_buftarg_t *); | 416 | extern void xfs_free_buftarg(struct xfs_mount *, struct xfs_buftarg *); |
417 | extern void xfs_wait_buftarg(xfs_buftarg_t *); | 417 | extern void xfs_wait_buftarg(xfs_buftarg_t *); |
418 | extern int xfs_setsize_buftarg(xfs_buftarg_t *, unsigned int, unsigned int); | 418 | extern int xfs_setsize_buftarg(xfs_buftarg_t *, unsigned int, unsigned int); |
419 | extern int xfs_flush_buftarg(xfs_buftarg_t *, int); | 419 | extern int xfs_flush_buftarg(xfs_buftarg_t *, int); |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index c71e226da7f5..32ae5028e96b 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -734,15 +734,15 @@ xfs_close_devices( | |||
734 | { | 734 | { |
735 | if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) { | 735 | if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) { |
736 | struct block_device *logdev = mp->m_logdev_targp->bt_bdev; | 736 | struct block_device *logdev = mp->m_logdev_targp->bt_bdev; |
737 | xfs_free_buftarg(mp->m_logdev_targp); | 737 | xfs_free_buftarg(mp, mp->m_logdev_targp); |
738 | xfs_blkdev_put(logdev); | 738 | xfs_blkdev_put(logdev); |
739 | } | 739 | } |
740 | if (mp->m_rtdev_targp) { | 740 | if (mp->m_rtdev_targp) { |
741 | struct block_device *rtdev = mp->m_rtdev_targp->bt_bdev; | 741 | struct block_device *rtdev = mp->m_rtdev_targp->bt_bdev; |
742 | xfs_free_buftarg(mp->m_rtdev_targp); | 742 | xfs_free_buftarg(mp, mp->m_rtdev_targp); |
743 | xfs_blkdev_put(rtdev); | 743 | xfs_blkdev_put(rtdev); |
744 | } | 744 | } |
745 | xfs_free_buftarg(mp->m_ddev_targp); | 745 | xfs_free_buftarg(mp, mp->m_ddev_targp); |
746 | } | 746 | } |
747 | 747 | ||
748 | /* | 748 | /* |
@@ -811,9 +811,9 @@ xfs_open_devices( | |||
811 | 811 | ||
812 | out_free_rtdev_targ: | 812 | out_free_rtdev_targ: |
813 | if (mp->m_rtdev_targp) | 813 | if (mp->m_rtdev_targp) |
814 | xfs_free_buftarg(mp->m_rtdev_targp); | 814 | xfs_free_buftarg(mp, mp->m_rtdev_targp); |
815 | out_free_ddev_targ: | 815 | out_free_ddev_targ: |
816 | xfs_free_buftarg(mp->m_ddev_targp); | 816 | xfs_free_buftarg(mp, mp->m_ddev_targp); |
817 | out_close_rtdev: | 817 | out_close_rtdev: |
818 | if (rtdev) | 818 | if (rtdev) |
819 | xfs_blkdev_put(rtdev); | 819 | xfs_blkdev_put(rtdev); |