]> err.no Git - linux-2.6/commitdiff
[XFS] Remove unused iop_abort log item operation
authorEric Sandeen <sandeen@sandeen.net>
Thu, 28 Sep 2006 01:02:44 +0000 (11:02 +1000)
committerTim Shimmin <tes@sgi.com>
Thu, 28 Sep 2006 01:02:44 +0000 (11:02 +1000)
SGI-PV: 955302
SGI-Modid: xfs-linux-melb:xfs-kern:26747a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/quota/xfs_dquot_item.c
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_extfree_item.c
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_trans.h

index 5b2dcc58b24430105bcca1860d7a589e811a3228..33ad5af386e03ed21cfee5b747341af6e5fd8d3e 100644 (file)
@@ -381,18 +381,6 @@ xfs_qm_dquot_logitem_unlock(
 }
 
 
-/*
- * The transaction with the dquot locked has aborted.  The dquot
- * must not be dirty within the transaction.  We simply unlock just
- * as if the transaction had been cancelled.
- */
-STATIC void
-xfs_qm_dquot_logitem_abort(
-       xfs_dq_logitem_t    *ql)
-{
-       xfs_qm_dquot_logitem_unlock(ql);
-}
-
 /*
  * this needs to stamp an lsn into the dquot, I think.
  * rpc's that look at user dquot's would then have to
@@ -426,7 +414,6 @@ STATIC struct xfs_item_ops xfs_dquot_item_ops = {
        .iop_committed  = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_qm_dquot_logitem_committed,
        .iop_push       = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_push,
-       .iop_abort      = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_abort,
        .iop_pushbuf    = (void(*)(xfs_log_item_t*))
                                        xfs_qm_dquot_logitem_pushbuf,
        .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
@@ -558,17 +545,6 @@ xfs_qm_qoff_logitem_committed(xfs_qoff_logitem_t *qf, xfs_lsn_t lsn)
        return (lsn);
 }
 
-/*
- * The transaction of which this QUOTAOFF is a part has been aborted.
- * Just clean up after ourselves.
- * Shouldn't this never happen in the case of qoffend logitems? XXX
- */
-STATIC void
-xfs_qm_qoff_logitem_abort(xfs_qoff_logitem_t *qf)
-{
-       kmem_free(qf, sizeof(xfs_qoff_logitem_t));
-}
-
 /*
  * There isn't much you can do to push on an quotaoff item.  It is simply
  * stuck waiting for the log to be flushed to disk.
@@ -644,7 +620,6 @@ STATIC struct xfs_item_ops xfs_qm_qoffend_logitem_ops = {
        .iop_committed  = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_qm_qoffend_logitem_committed,
        .iop_push       = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_push,
-       .iop_abort      = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_abort,
        .iop_pushbuf    = NULL,
        .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_qm_qoffend_logitem_committing
@@ -667,7 +642,6 @@ STATIC struct xfs_item_ops xfs_qm_qoff_logitem_ops = {
        .iop_committed  = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_qm_qoff_logitem_committed,
        .iop_push       = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_push,
-       .iop_abort      = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_abort,
        .iop_pushbuf    = NULL,
        .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_qm_qoff_logitem_committing
index 4597381b8ff9fc3dec8614c25b80ea760c421a4d..7a55c248ea706a405fa4eddd1fb8d80a5f0c4d0b 100644 (file)
@@ -626,25 +626,6 @@ xfs_buf_item_committed(
        return (lsn);
 }
 
-/*
- * This is called when the transaction holding the buffer is aborted.
- * Just behave as if the transaction had been cancelled. If we're shutting down
- * and have aborted this transaction, we'll trap this buffer when it tries to
- * get written out.
- */
-STATIC void
-xfs_buf_item_abort(
-       xfs_buf_log_item_t      *bip)
-{
-       xfs_buf_t       *bp;
-
-       bp = bip->bli_buf;
-       xfs_buftrace("XFS_ABORT", bp);
-       XFS_BUF_SUPER_STALE(bp);
-       xfs_buf_item_unlock(bip);
-       return;
-}
-
 /*
  * This is called to asynchronously write the buffer associated with this
  * buf log item out to disk. The buffer will already have been locked by
@@ -692,7 +673,6 @@ STATIC struct xfs_item_ops xfs_buf_item_ops = {
        .iop_committed  = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_buf_item_committed,
        .iop_push       = (void(*)(xfs_log_item_t*))xfs_buf_item_push,
-       .iop_abort      = (void(*)(xfs_log_item_t*))xfs_buf_item_abort,
        .iop_pushbuf    = NULL,
        .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_buf_item_committing
index 6cf6d8769b975902c290a4485372b9b507793aa1..6dba78199faf54e40fcc36fcdf9a61cbe865b436 100644 (file)
@@ -33,9 +33,6 @@ kmem_zone_t   *xfs_efi_zone;
 kmem_zone_t    *xfs_efd_zone;
 
 STATIC void    xfs_efi_item_unlock(xfs_efi_log_item_t *);
-STATIC void    xfs_efi_item_abort(xfs_efi_log_item_t *);
-STATIC void    xfs_efd_item_abort(xfs_efd_log_item_t *);
-
 
 void
 xfs_efi_item_free(xfs_efi_log_item_t *efip)
@@ -184,7 +181,7 @@ STATIC void
 xfs_efi_item_unlock(xfs_efi_log_item_t *efip)
 {
        if (efip->efi_item.li_flags & XFS_LI_ABORTED)
-               xfs_efi_item_abort(efip);
+               xfs_efi_item_free(efip);
        return;
 }
 
@@ -201,18 +198,6 @@ xfs_efi_item_committed(xfs_efi_log_item_t *efip, xfs_lsn_t lsn)
        return lsn;
 }
 
-/*
- * This is called when the transaction logging the EFI is aborted.
- * Free up the EFI and return.  No need to clean up the slot for
- * the item in the transaction.  That was done by the unpin code
- * which is called prior to this routine in the abort/fs-shutdown path.
- */
-STATIC void
-xfs_efi_item_abort(xfs_efi_log_item_t *efip)
-{
-       xfs_efi_item_free(efip);
-}
-
 /*
  * There isn't much you can do to push on an efi item.  It is simply
  * stuck waiting for all of its corresponding efd items to be
@@ -255,7 +240,6 @@ STATIC struct xfs_item_ops xfs_efi_item_ops = {
        .iop_committed  = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_efi_item_committed,
        .iop_push       = (void(*)(xfs_log_item_t*))xfs_efi_item_push,
-       .iop_abort      = (void(*)(xfs_log_item_t*))xfs_efi_item_abort,
        .iop_pushbuf    = NULL,
        .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_efi_item_committing
@@ -386,33 +370,6 @@ xfs_efi_release(xfs_efi_log_item_t *efip,
        }
 }
 
-/*
- * This is called when the transaction that should be committing the
- * EFD corresponding to the given EFI is aborted.  The committed and
- * canceled flags are used to coordinate the freeing of the EFI and
- * the references by the transaction that committed it.
- */
-STATIC void
-xfs_efi_cancel(
-       xfs_efi_log_item_t      *efip)
-{
-       xfs_mount_t     *mp;
-       SPLDECL(s);
-
-       mp = efip->efi_item.li_mountp;
-       AIL_LOCK(mp, s);
-       if (efip->efi_flags & XFS_EFI_COMMITTED) {
-               /*
-                * xfs_trans_delete_ail() drops the AIL lock.
-                */
-               xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s);
-               xfs_efi_item_free(efip);
-       } else {
-               efip->efi_flags |= XFS_EFI_CANCELED;
-               AIL_UNLOCK(mp, s);
-       }
-}
-
 STATIC void
 xfs_efd_item_free(xfs_efd_log_item_t *efdp)
 {
@@ -514,7 +471,7 @@ STATIC void
 xfs_efd_item_unlock(xfs_efd_log_item_t *efdp)
 {
        if (efdp->efd_item.li_flags & XFS_LI_ABORTED)
-               xfs_efd_item_abort(efdp);
+               xfs_efd_item_free(efdp);
        return;
 }
 
@@ -540,27 +497,6 @@ xfs_efd_item_committed(xfs_efd_log_item_t *efdp, xfs_lsn_t lsn)
        return (xfs_lsn_t)-1;
 }
 
-/*
- * The transaction of which this EFD is a part has been aborted.
- * Inform its companion EFI of this fact and then clean up after
- * ourselves.  No need to clean up the slot for the item in the
- * transaction.  That was done by the unpin code which is called
- * prior to this routine in the abort/fs-shutdown path.
- */
-STATIC void
-xfs_efd_item_abort(xfs_efd_log_item_t *efdp)
-{
-       /*
-        * If we got a log I/O error, it's always the case that the LR with the
-        * EFI got unpinned and freed before the EFD got aborted. So don't
-        * reference the EFI at all in that case.
-        */
-       if ((efdp->efd_item.li_flags & XFS_LI_ABORTED) == 0)
-               xfs_efi_cancel(efdp->efd_efip);
-
-       xfs_efd_item_free(efdp);
-}
-
 /*
  * There isn't much you can do to push on an efd item.  It is simply
  * stuck waiting for the log to be flushed to disk.
@@ -602,7 +538,6 @@ STATIC struct xfs_item_ops xfs_efd_item_ops = {
        .iop_committed  = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_efd_item_committed,
        .iop_push       = (void(*)(xfs_log_item_t*))xfs_efd_item_push,
-       .iop_abort      = (void(*)(xfs_log_item_t*))xfs_efd_item_abort,
        .iop_pushbuf    = NULL,
        .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
                                        xfs_efd_item_committing
index f8e80d8e72370ff12bfa66686256b7641f7ca7cc..a7a92251eb564d84c3898d407b01b04baf7c673f 100644 (file)
@@ -742,21 +742,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.
@@ -915,7 +900,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
index 9dc88b380608e6f29a6bef4c7ee5c21945367f0f..c68e00105d238daeedc3aa036e0f234dd38f8a3d 100644 (file)
@@ -149,7 +149,6 @@ typedef struct xfs_item_ops {
        void (*iop_unlock)(xfs_log_item_t *);
        xfs_lsn_t (*iop_committed)(xfs_log_item_t *, xfs_lsn_t);
        void (*iop_push)(xfs_log_item_t *);
-       void (*iop_abort)(xfs_log_item_t *);
        void (*iop_pushbuf)(xfs_log_item_t *);
        void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t);
 } xfs_item_ops_t;
@@ -163,7 +162,6 @@ typedef struct xfs_item_ops {
 #define IOP_UNLOCK(ip)         (*(ip)->li_ops->iop_unlock)(ip)
 #define IOP_COMMITTED(ip, lsn) (*(ip)->li_ops->iop_committed)(ip, lsn)
 #define IOP_PUSH(ip)           (*(ip)->li_ops->iop_push)(ip)
-#define IOP_ABORT(ip)          (*(ip)->li_ops->iop_abort)(ip)
 #define IOP_PUSHBUF(ip)                (*(ip)->li_ops->iop_pushbuf)(ip)
 #define IOP_COMMITTING(ip, lsn) (*(ip)->li_ops->iop_committing)(ip, lsn)