xfs: replace xfs_sb_version checks with feature flag checks
[linux-2.6-microblaze.git] / fs / xfs / xfs_buf.c
index 8ff42b3..5d2ebee 100644 (file)
@@ -315,7 +315,6 @@ xfs_buf_alloc_kmem(
        struct xfs_buf  *bp,
        xfs_buf_flags_t flags)
 {
-       int             align_mask = xfs_buftarg_dma_alignment(bp->b_target);
        xfs_km_flags_t  kmflag_mask = KM_NOFS;
        size_t          size = BBTOB(bp->b_length);
 
@@ -323,7 +322,7 @@ xfs_buf_alloc_kmem(
        if (!(flags & XBF_READ))
                kmflag_mask |= KM_ZERO;
 
-       bp->b_addr = kmem_alloc_io(size, align_mask, kmflag_mask);
+       bp->b_addr = kmem_alloc(size, kmflag_mask);
        if (!bp->b_addr)
                return -ENOMEM;
 
@@ -1521,7 +1520,7 @@ _xfs_buf_ioapply(
                         * non-crc filesystems don't attach verifiers during
                         * log recovery, so don't warn for such filesystems.
                         */
-                       if (xfs_sb_version_hascrc(&mp->m_sb)) {
+                       if (xfs_has_crc(mp)) {
                                xfs_warn(mp,
                                        "%s: no buf ops on daddr 0x%llx len %d",
                                        __func__, bp->b_bn, bp->b_length);
@@ -2302,7 +2301,7 @@ xfs_verify_magic(
        struct xfs_mount        *mp = bp->b_mount;
        int                     idx;
 
-       idx = xfs_sb_version_hascrc(&mp->m_sb);
+       idx = xfs_has_crc(mp);
        if (WARN_ON(!bp->b_ops || !bp->b_ops->magic[idx]))
                return false;
        return dmagic == bp->b_ops->magic[idx];
@@ -2320,7 +2319,7 @@ xfs_verify_magic16(
        struct xfs_mount        *mp = bp->b_mount;
        int                     idx;
 
-       idx = xfs_sb_version_hascrc(&mp->m_sb);
+       idx = xfs_has_crc(mp);
        if (WARN_ON(!bp->b_ops || !bp->b_ops->magic16[idx]))
                return false;
        return dmagic == bp->b_ops->magic16[idx];