]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_inode_item.c
tc35815: Whitespace cleanup
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_inode_item.c
index f8e80d8e72370ff12bfa66686256b7641f7ca7cc..034ca7202295dc143d4e4563968c610fd8041242 100644 (file)
@@ -274,6 +274,11 @@ xfs_inode_item_format(
         */
        xfs_synchronize_atime(ip);
 
+       /*
+        * make sure the linux inode is dirty
+        */
+       xfs_mark_inode_dirty_sync(ip);
+
        vecp->i_addr = (xfs_caddr_t)&ip->i_d;
        vecp->i_len  = sizeof(xfs_dinode_core_t);
        XLOG_VEC_SET_TYPE(vecp, XLOG_REG_TYPE_ICORE);
@@ -615,7 +620,7 @@ xfs_inode_item_trylock(
                        return XFS_ITEM_PUSHBUF;
                } else {
                        /*
-                        * We hold the AIL_LOCK, so we must specify the
+                        * We hold the AIL lock, so we must specify the
                         * NONOTIFY flag so that we won't double trip.
                         */
                        xfs_iunlock(ip, XFS_ILOCK_SHARED|XFS_IUNLOCK_NONOTIFY);
@@ -742,21 +747,6 @@ xfs_inode_item_committed(
        return (lsn);
 }
 
-/*
- * The transaction with the inode locked has aborted.  The inode
- * must not be dirty within the transaction (unless we're forcibly
- * shutting down).  We simply unlock just as if the transaction
- * had been cancelled.
- */
-STATIC void
-xfs_inode_item_abort(
-       xfs_inode_log_item_t    *iip)
-{
-       xfs_inode_item_unlock(iip);
-       return;
-}
-
-
 /*
  * This gets called by xfs_trans_push_ail(), when IOP_TRYLOCK
  * failed to get the inode flush lock but did get the inode locked SHARED.
@@ -764,7 +754,7 @@ xfs_inode_item_abort(
  * marked delayed write. If that's the case, we'll initiate a bawrite on that
  * buffer to expedite the process.
  *
- * We aren't holding the AIL_LOCK (or the flush lock) when this gets called,
+ * We aren't holding the AIL lock (or the flush lock) when this gets called,
  * so it is inherently race-y.
  */
 STATIC void
@@ -807,7 +797,7 @@ xfs_inode_item_pushbuf(
                if (XFS_BUF_ISDELAYWRITE(bp)) {
                        /*
                         * We were racing with iflush because we don't hold
-                        * the AIL_LOCK or the flush lock. However, at this point,
+                        * the AIL lock or the flush lock. However, at this point,
                         * we have the buffer, and we know that it's dirty.
                         * So, it's possible that iflush raced with us, and
                         * this item is already taken off the AIL.
@@ -902,7 +892,7 @@ xfs_inode_item_committing(
 /*
  * This is the ops vector shared by all buf log items.
  */
-STATIC struct xfs_item_ops xfs_inode_item_ops = {
+static struct xfs_item_ops xfs_inode_item_ops = {
        .iop_size       = (uint(*)(xfs_log_item_t*))xfs_inode_item_size,
        .iop_format     = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
                                        xfs_inode_item_format,
@@ -915,7 +905,6 @@ STATIC struct xfs_item_ops xfs_inode_item_ops = {
        .iop_committed  = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_inode_item_committed,
        .iop_push       = (void(*)(xfs_log_item_t*))xfs_inode_item_push,
-       .iop_abort      = (void(*)(xfs_log_item_t*))xfs_inode_item_abort,
        .iop_pushbuf    = (void(*)(xfs_log_item_t*))xfs_inode_item_pushbuf,
        .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_inode_item_committing
@@ -984,7 +973,6 @@ xfs_iflush_done(
        xfs_inode_log_item_t    *iip)
 {
        xfs_inode_t     *ip;
-       SPLDECL(s);
 
        ip = iip->ili_inode;
 
@@ -999,15 +987,15 @@ xfs_iflush_done(
         */
        if (iip->ili_logged &&
            (iip->ili_item.li_lsn == iip->ili_flush_lsn)) {
-               AIL_LOCK(ip->i_mount, s);
+               spin_lock(&ip->i_mount->m_ail_lock);
                if (iip->ili_item.li_lsn == iip->ili_flush_lsn) {
                        /*
                         * xfs_trans_delete_ail() drops the AIL lock.
                         */
                        xfs_trans_delete_ail(ip->i_mount,
-                                            (xfs_log_item_t*)iip, s);
+                                            (xfs_log_item_t*)iip);
                } else {
-                       AIL_UNLOCK(ip->i_mount, s);
+                       spin_unlock(&ip->i_mount->m_ail_lock);
                }
        }
 
@@ -1041,21 +1029,19 @@ xfs_iflush_abort(
 {
        xfs_inode_log_item_t    *iip;
        xfs_mount_t             *mp;
-       SPLDECL(s);
 
        iip = ip->i_itemp;
        mp = ip->i_mount;
        if (iip) {
                if (iip->ili_item.li_flags & XFS_LI_IN_AIL) {
-                       AIL_LOCK(mp, s);
+                       spin_lock(&mp->m_ail_lock);
                        if (iip->ili_item.li_flags & XFS_LI_IN_AIL) {
                                /*
                                 * xfs_trans_delete_ail() drops the AIL lock.
                                 */
-                               xfs_trans_delete_ail(mp, (xfs_log_item_t *)iip,
-                                       s);
+                               xfs_trans_delete_ail(mp, (xfs_log_item_t *)iip);
                        } else
-                               AIL_UNLOCK(mp, s);
+                               spin_unlock(&mp->m_ail_lock);
                }
                iip->ili_logged = 0;
                /*