diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-09-21 20:47:20 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-10-18 16:07:48 -0400 |
commit | ebad861b5702c3e2332a3e906978f47144d22f70 (patch) | |
tree | 7b4502277c46d26d1d26258d05596b58ab6b868a /fs/xfs/linux-2.6/xfs_super.c | |
parent | 5adc94c247c3779782c7b0b8b5e28cf50596eb37 (diff) |
xfs: store xfs_mount in the buftarg instead of in the xfs_buf
Each buffer contains both a buftarg pointer and a mount pointer. If
we add a mount pointer into the buftarg, we can avoid needing the
b_mount field in every buffer and grab it from the buftarg when
needed instead. This shrinks the xfs_buf by 8 bytes.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 83154c0a3175..4759be4daa26 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -758,18 +758,20 @@ xfs_open_devices( | |||
758 | * Setup xfs_mount buffer target pointers | 758 | * Setup xfs_mount buffer target pointers |
759 | */ | 759 | */ |
760 | error = ENOMEM; | 760 | error = ENOMEM; |
761 | mp->m_ddev_targp = xfs_alloc_buftarg(ddev, 0, mp->m_fsname); | 761 | mp->m_ddev_targp = xfs_alloc_buftarg(mp, ddev, 0, mp->m_fsname); |
762 | if (!mp->m_ddev_targp) | 762 | if (!mp->m_ddev_targp) |
763 | goto out_close_rtdev; | 763 | goto out_close_rtdev; |
764 | 764 | ||
765 | if (rtdev) { | 765 | if (rtdev) { |
766 | mp->m_rtdev_targp = xfs_alloc_buftarg(rtdev, 1, mp->m_fsname); | 766 | mp->m_rtdev_targp = xfs_alloc_buftarg(mp, rtdev, 1, |
767 | mp->m_fsname); | ||
767 | if (!mp->m_rtdev_targp) | 768 | if (!mp->m_rtdev_targp) |
768 | goto out_free_ddev_targ; | 769 | goto out_free_ddev_targ; |
769 | } | 770 | } |
770 | 771 | ||
771 | if (logdev && logdev != ddev) { | 772 | if (logdev && logdev != ddev) { |
772 | mp->m_logdev_targp = xfs_alloc_buftarg(logdev, 1, mp->m_fsname); | 773 | mp->m_logdev_targp = xfs_alloc_buftarg(mp, logdev, 1, |
774 | mp->m_fsname); | ||
773 | if (!mp->m_logdev_targp) | 775 | if (!mp->m_logdev_targp) |
774 | goto out_free_rtdev_targ; | 776 | goto out_free_rtdev_targ; |
775 | } else { | 777 | } else { |