int jfs_tlocks_low; /* Indicates low number of available tlocks */
#ifdef CONFIG_JFS_STATISTICS
-struct {
+static struct {
uint txBegin;
uint txBegin_barrier;
uint txBegin_lockslow;
/*
* transaction management lock
*/
-static spinlock_t jfsTxnLock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(jfsTxnLock);
#define TXN_LOCK() spin_lock(&jfsTxnLock)
#define TXN_UNLOCK() spin_unlock(&jfsTxnLock)
/*
* statistics
*/
-struct {
+static struct {
tid_t maxtid; /* 4: biggest tid ever used */
lid_t maxlid; /* 4: biggest lid ever used */
int ntid; /* 4: # of transactions performed */
* external references
*/
extern int lmGroupCommit(struct jfs_log *, struct tblock *);
-extern void lmSync(struct jfs_log *);
extern int jfs_commit_inode(struct inode *, int);
extern int jfs_stop_threads;
void txExit(void)
{
vfree(TxLock);
- TxLock = 0;
+ TxLock = NULL;
vfree(TxBlock);
- TxBlock = 0;
+ TxBlock = NULL;
}
hold_metapage(mp, 0);
atomic_dec(&mp->nohomeok);
discard_metapage(mp);
- tlck->mp = 0;
+ tlck->mp = NULL;
return 0;
}
struct pxd_lock pxdlock;
int maptype;
int k, nlock;
- struct metapage *mp = 0;
+ struct metapage *mp = NULL;
ipimap = JFS_SBI(tblk->sb)->ipimap;
assert(atomic_read(&mp->nohomeok) == 1);
atomic_dec(&mp->nohomeok);
discard_metapage(mp);
- tlck->mp = 0;
+ tlck->mp = NULL;
}
}
/*
TXN_LOCK();
xtlck = (struct tlock *) &jfs_ip->atlhead;
- while ((lid = xtlck->next)) {
+ while ((lid = xtlck->next) != 0) {
tlck = lid_to_tlock(lid);
if (tlck->flag & tlckFREELOCK) {
xtlck->next = tlck->next;
struct tblock *tblk = tid_to_tblock(tid);
struct tlock *tlck;
- jfs_warn("txAbort: tid:%d dirty:0x%x", tid, dirty);
-
/*
* free tlocks of the transaction
*/