]> err.no Git - linux-2.6/blobdiff - fs/xfs/quota/xfs_dquot.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
[linux-2.6] / fs / xfs / quota / xfs_dquot.c
index 772ac48329ea04661193044f68fc417507db214e..665babcca6a6891724199df74ac09af68065503b 100644 (file)
@@ -23,7 +23,6 @@
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
-#include "xfs_dir.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
 #include "xfs_dmapi.h"
@@ -32,7 +31,6 @@
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
 #include "xfs_ialloc_btree.h"
-#include "xfs_dir_sf.h"
 #include "xfs_dir2_sf.h"
 #include "xfs_attr_sf.h"
 #include "xfs_dinode.h"
@@ -45,8 +43,6 @@
 #include "xfs_itable.h"
 #include "xfs_rw.h"
 #include "xfs_acl.h"
-#include "xfs_cap.h"
-#include "xfs_mac.h"
 #include "xfs_attr.h"
 #include "xfs_buf_item.h"
 #include "xfs_trans_space.h"
@@ -444,7 +440,7 @@ xfs_qm_dqalloc(
                              XFS_BMAPI_METADATA | XFS_BMAPI_WRITE,
                              &firstblock,
                              XFS_QM_DQALLOC_SPACE_RES(mp),
-                             &map, &nmaps, &flist))) {
+                             &map, &nmaps, &flist, NULL))) {
                goto error0;
        }
        ASSERT(map.br_blockcount == XFS_DQUOT_CLUSTER_SIZE_FSB);
@@ -486,7 +482,7 @@ xfs_qm_dqalloc(
 
        xfs_trans_bhold(tp, bp);
 
-       if ((error = xfs_bmap_finish(tpp, &flist, firstblock, &committed))) {
+       if ((error = xfs_bmap_finish(tpp, &flist, &committed))) {
                goto error1;
        }
 
@@ -559,7 +555,7 @@ xfs_qm_dqtobp(
                error = xfs_bmapi(NULL, quotip, dqp->q_fileoffset,
                                  XFS_DQUOT_CLUSTER_SIZE_FSB,
                                  XFS_BMAPI_METADATA,
-                                 NULL, 0, &map, &nmaps, NULL);
+                                 NULL, 0, &map, &nmaps, NULL, NULL);
 
                xfs_iunlock(quotip, XFS_ILOCK_SHARED);
                if (error)
@@ -757,8 +753,7 @@ xfs_qm_idtodq(
                goto error0;
        }
        if (tp) {
-               if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES,
-                                            NULL)))
+               if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES)))
                        goto error1;
        }
 
@@ -1214,7 +1209,6 @@ xfs_qm_dqflush(
        xfs_buf_t               *bp;
        xfs_disk_dquot_t        *ddqp;
        int                     error;
-       SPLDECL(s);
 
        ASSERT(XFS_DQ_IS_LOCKED(dqp));
        ASSERT(XFS_DQ_IS_FLUSH_LOCKED(dqp));
@@ -1261,7 +1255,7 @@ xfs_qm_dqflush(
 
        if (xfs_qm_dqcheck(&dqp->q_core, be32_to_cpu(ddqp->d_id),
                           0, XFS_QMOPT_DOWARN, "dqflush (incore copy)")) {
-               xfs_force_shutdown(dqp->q_mount, XFS_CORRUPT_INCORE);
+               xfs_force_shutdown(dqp->q_mount, SHUTDOWN_CORRUPT_INCORE);
                return XFS_ERROR(EIO);
        }
 
@@ -1275,9 +1269,9 @@ xfs_qm_dqflush(
        mp = dqp->q_mount;
 
        /* lsn is 64 bits */
-       AIL_LOCK(mp, s);
+       spin_lock(&mp->m_ail_lock);
        dqp->q_logitem.qli_flush_lsn = dqp->q_logitem.qli_item.li_lsn;
-       AIL_UNLOCK(mp, s);
+       spin_unlock(&mp->m_ail_lock);
 
        /*
         * Attach an iodone routine so that we can remove this dquot from the
@@ -1323,7 +1317,6 @@ xfs_qm_dqflush_done(
        xfs_dq_logitem_t        *qip)
 {
        xfs_dquot_t             *dqp;
-       SPLDECL(s);
 
        dqp = qip->qli_dquot;
 
@@ -1338,15 +1331,15 @@ xfs_qm_dqflush_done(
        if ((qip->qli_item.li_flags & XFS_LI_IN_AIL) &&
            qip->qli_item.li_lsn == qip->qli_flush_lsn) {
 
-               AIL_LOCK(dqp->q_mount, s);
+               spin_lock(&dqp->q_mount->m_ail_lock);
                /*
                 * xfs_trans_delete_ail() drops the AIL lock.
                 */
                if (qip->qli_item.li_lsn == qip->qli_flush_lsn)
                        xfs_trans_delete_ail(dqp->q_mount,
-                                            (xfs_log_item_t*)qip, s);
+                                            (xfs_log_item_t*)qip);
                else
-                       AIL_UNLOCK(dqp->q_mount, s);
+                       spin_unlock(&dqp->q_mount->m_ail_lock);
        }
 
        /*