]> git.hungrycats.org Git - linux/commitdiff
JFS: [CHECKER] get rid of txAbortCommit
authorDave Kleikamp <shaggy@austin.ibm.com>
Tue, 4 May 2004 09:26:19 +0000 (04:26 -0500)
committerDave Kleikamp <shaggy@austin.ibm.com>
Tue, 4 May 2004 09:26:19 +0000 (04:26 -0500)
txAbortCommit is broken and fixing it makes it equivalent to txAbort,
so get rid of it and use txAbort instead.

fs/jfs/jfs_txnmgr.c

index 6c887b9e14575f616c772f55f090d85b0b08f08d..551cb7f0b663615c1442484a38da6b4836517603 100644 (file)
@@ -176,7 +176,6 @@ static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
                struct tlock * tlck);
 static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
                struct tlock * tlck);
-static void txAbortCommit(struct commit * cd);
 static void txAllocPMap(struct inode *ip, struct maplock * maplock,
                struct tblock * tblk);
 static void txForce(struct tblock * tblk);
@@ -1315,7 +1314,7 @@ int txCommit(tid_t tid,           /* transaction identifier */
 
       out:
        if (rc != 0)
-               txAbortCommit(&cd);
+               txAbort(tid, 1);
 
       TheEnd:
        jfs_info("txCommit: tid = %d, returning %d", tid, rc);
@@ -2647,64 +2646,6 @@ void txAbort(tid_t tid, int dirty)
        return;
 }
 
-
-/*
- *      txAbortCommit()
- *
- * function: abort commit.
- *
- * frees tlocks of transaction; line-locks and segment locks for all
- * segments in comdata structure. frees malloc storage
- * sets state of file-system to FM_MDIRTY in super-block.
- * log age of page-frames in memory for which caller has
- * are reset to 0 (to avoid logwarap).
- */
-static void txAbortCommit(struct commit * cd)
-{
-       struct tblock *tblk;
-       tid_t tid;
-       lid_t lid, next;
-       struct metapage *mp;
-
-       jfs_warn("txAbortCommit: cd:0x%p", cd);
-
-       /*
-        * free tlocks of the transaction
-        */
-       tid = cd->tid;
-       tblk = tid_to_tblock(tid);
-       for (lid = tblk->next; lid; lid = next) {
-               next = lid_to_tlock(lid)->next;
-
-               mp = lid_to_tlock(lid)->mp;
-               if (mp) {
-                       mp->lid = 0;
-
-                       /*
-                        * reset lsn of page to avoid logwarap;
-                        */
-                       if (mp->xflag & COMMIT_PAGE)
-                               LogSyncRelease(mp);
-               }
-
-               /* insert tlock at head of freelist */
-               TXN_LOCK();
-               txLockFree(lid);
-               TXN_UNLOCK();
-       }
-
-       tblk->next = tblk->last = 0;
-
-       /* free the transaction block */
-       txEnd(tid);
-
-       /*
-        * mark filesystem dirty
-        */
-       jfs_error(cd->sb, "txAbortCommit");
-}
-
-
 /*
  *      txLazyCommit(void)
  *