[XFS] Unwrap XFS_SB_LOCK.
[pandora-kernel.git] / fs / xfs / xfs_bmap.c
index 16b97db..97f0328 100644 (file)
@@ -53,6 +53,7 @@
 #include "xfs_trans_space.h"
 #include "xfs_buf_item.h"
 #include "xfs_filestream.h"
+#include "xfs_vnodeops.h"
 
 
 #ifdef DEBUG
@@ -3955,7 +3956,6 @@ xfs_bmap_add_attrfork(
        xfs_bmap_free_t         flist;          /* freed extent records */
        xfs_mount_t             *mp;            /* mount structure */
        xfs_trans_t             *tp;            /* transaction pointer */
-       unsigned long           s;              /* spinlock spl value */
        int                     blks;           /* space reservation */
        int                     version = 1;    /* superblock attr version */
        int                     committed;      /* xaction was committed */
@@ -4052,7 +4052,7 @@ xfs_bmap_add_attrfork(
           (!XFS_SB_VERSION_HASATTR2(&mp->m_sb) && version == 2)) {
                __int64_t sbfields = 0;
 
-               s = XFS_SB_LOCK(mp);
+               spin_lock(&mp->m_sb_lock);
                if (!XFS_SB_VERSION_HASATTR(&mp->m_sb)) {
                        XFS_SB_VERSION_ADDATTR(&mp->m_sb);
                        sbfields |= XFS_SB_VERSIONNUM;
@@ -4062,10 +4062,10 @@ xfs_bmap_add_attrfork(
                        sbfields |= (XFS_SB_VERSIONNUM | XFS_SB_FEATURES2);
                }
                if (sbfields) {
-                       XFS_SB_UNLOCK(mp, s);
+                       spin_unlock(&mp->m_sb_lock);
                        xfs_mod_sb(tp, sbfields);
                } else
-                       XFS_SB_UNLOCK(mp, s);
+                       spin_unlock(&mp->m_sb_lock);
        }
        if ((error = xfs_bmap_finish(&tp, &flist, &committed)))
                goto error2;
@@ -5868,7 +5868,8 @@ xfs_getbmap(
        if (whichfork == XFS_DATA_FORK &&
                (ip->i_delayed_blks || ip->i_size > ip->i_d.di_size)) {
                /* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */
-               error = bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF);
+               error = xfs_flush_pages(ip, (xfs_off_t)0,
+                                              -1, 0, FI_REMAPF);
        }
 
        ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0);