]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_fsops.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_fsops.c
index c92d5b821029b4a002681c5a112862c84f1e7e0c..eadc1591c795ab1aa7a1db3fd08d30c9cda5e52a 100644 (file)
@@ -318,7 +318,7 @@ xfs_growfs_data_private(
                }
                ASSERT(bp);
                agi = XFS_BUF_TO_AGI(bp);
-               be32_add(&agi->agi_length, new);
+               be32_add_cpu(&agi->agi_length, new);
                ASSERT(nagcount == oagcount ||
                       be32_to_cpu(agi->agi_length) == mp->m_sb.sb_agblocks);
                xfs_ialloc_log_agi(tp, bp, XFS_AGI_LENGTH);
@@ -331,7 +331,7 @@ xfs_growfs_data_private(
                }
                ASSERT(bp);
                agf = XFS_BUF_TO_AGF(bp);
-               be32_add(&agf->agf_length, new);
+               be32_add_cpu(&agf->agf_length, new);
                ASSERT(be32_to_cpu(agf->agf_length) ==
                       be32_to_cpu(agi->agi_length));
                xfs_alloc_log_agf(tp, bp, XFS_AGF_LENGTH);
@@ -462,15 +462,13 @@ xfs_fs_counts(
        xfs_mount_t             *mp,
        xfs_fsop_counts_t       *cnt)
 {
-       unsigned long   s;
-
        xfs_icsb_sync_counters_flags(mp, XFS_ICSB_LAZY_COUNT);
-       s = XFS_SB_LOCK(mp);
+       spin_lock(&mp->m_sb_lock);
        cnt->freedata = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
        cnt->freertx = mp->m_sb.sb_frextents;
        cnt->freeino = mp->m_sb.sb_ifree;
        cnt->allocino = mp->m_sb.sb_icount;
-       XFS_SB_UNLOCK(mp, s);
+       spin_unlock(&mp->m_sb_lock);
        return 0;
 }
 
@@ -497,7 +495,6 @@ xfs_reserve_blocks(
 {
        __int64_t               lcounter, delta, fdblks_delta;
        __uint64_t              request;
-       unsigned long           s;
 
        /* If inval is null, report current values and return */
        if (inval == (__uint64_t *)NULL) {
@@ -515,7 +512,7 @@ xfs_reserve_blocks(
         * problem. we needto work out if we are freeing or allocation
         * blocks first, then we can do the modification as necessary.
         *
-        * We do this under the XFS_SB_LOCK so that if we are near
+        * We do this under the m_sb_lock so that if we are near
         * ENOSPC, we will hold out any changes while we work out
         * what to do. This means that the amount of free space can
         * change while we do this, so we need to retry if we end up
@@ -526,7 +523,7 @@ xfs_reserve_blocks(
         * enabled, disabled or even compiled in....
         */
 retry:
-       s = XFS_SB_LOCK(mp);
+       spin_lock(&mp->m_sb_lock);
        xfs_icsb_sync_counters_flags(mp, XFS_ICSB_SB_LOCKED);
 
        /*
@@ -569,7 +566,7 @@ out:
                outval->resblks = mp->m_resblks;
                outval->resblks_avail = mp->m_resblks_avail;
        }
-       XFS_SB_UNLOCK(mp, s);
+       spin_unlock(&mp->m_sb_lock);
 
        if (fdblks_delta) {
                /*