Commit 83adddf7 authored by Dave Kleikamp's avatar Dave Kleikamp

Merge jfs@jfs.bkbits.net:linux-2.5

into shaggy.austin.ibm.com:/shaggy/bk/jfs-2.5
parents d189d057 e2fffa02
......@@ -2978,7 +2978,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
int d_namleft, len, outlen;
unsigned long dirent_buf;
char *name_ptr;
int dtlhdrdatalen;
u32 dir_index;
int do_index = 0;
uint loop_count = 0;
......@@ -2998,7 +2997,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
* -1 = End of directory
*/
do_index = 1;
dtlhdrdatalen = DTLHDRDATALEN;
dir_index = (u32) filp->f_pos;
......@@ -3083,8 +3081,6 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
* pn > 0: Real entries, pn=1 -> leftmost page
* pn = index = -1: No more entries
*/
dtlhdrdatalen = DTLHDRDATALEN_LEGACY;
dtpos = filp->f_pos;
if (dtpos == 0) {
/* build "." entry */
......
......@@ -91,7 +91,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr)
{
struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb);
s64 nxlen, nxaddr, xoff, hint, xaddr = 0;
int rc, nbperpage;
int rc;
int xflag;
/* This blocks if we are low on resources */
......@@ -104,9 +104,6 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr)
if (xlen > MAXXLEN)
xlen = MAXXLEN;
/* get the number of blocks per page */
nbperpage = sbi->nbperpage;
/* get the page's starting extent offset */
xoff = pno << sbi->l2nbperpage;
......
......@@ -2966,7 +2966,6 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
struct buffer_head *bh;
struct inode *ip;
tid_t tid;
int rc;
/* if AIT2 ipmap2 is bad, do not try to update it */
if (JFS_SBI(sb)->mntflag & JFS_BAD_SAIT) /* s_flag */
......@@ -2974,7 +2973,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
ip = diReadSpecial(sb, FILESYSTEM_I, 1);
if (ip == NULL) {
JFS_SBI(sb)->mntflag |= JFS_BAD_SAIT;
if ((rc = readSuper(sb, &bh)))
if (readSuper(sb, &bh))
return;
j_sb = (struct jfs_superblock *)bh->b_data;
j_sb->s_flag |= JFS_BAD_SAIT;
......@@ -2988,7 +2987,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
/* start transaction */
tid = txBegin(sb, COMMIT_FORCE);
/* update the inode map addressing structure to point to it */
if ((rc = xtInsert(tid, ip, 0, blkno, xlen, xaddr, 0))) {
if (xtInsert(tid, ip, 0, blkno, xlen, xaddr, 0)) {
JFS_SBI(sb)->mntflag |= JFS_BAD_SAIT;
txAbort(tid, 1);
goto cleanup;
......@@ -2997,7 +2996,7 @@ static void duplicateIXtree(struct super_block *sb, s64 blkno,
/* update the inode map's inode to reflect the extension */
ip->i_size += PSIZE;
ip->i_blocks += LBLK2PBLK(sb, xlen);
rc = txCommit(tid, 1, &ip, COMMIT_FORCE);
txCommit(tid, 1, &ip, COMMIT_FORCE);
cleanup:
txEnd(tid);
diFreeSpecial(ip);
......
......@@ -380,8 +380,8 @@ tid_t txBegin(struct super_block *sb, int flag)
tblk = tid_to_tblock(t);
if ((tblk->next == 0) && (current != jfsCommitTask)) {
/* Save one tblk for jfsCommit thread */
if ((tblk->next == 0) && !(flag & COMMIT_FORCE)) {
/* Don't let a non-forced transaction take the last tblk */
jfs_info("txBegin: waiting for free tid");
INCREMENT(TxStat.txBegin_freetid);
TXN_SLEEP(&TxAnchor.freewait);
......@@ -1553,12 +1553,10 @@ int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
struct tlock * tlck)
{
struct inode *ip;
struct metapage *mp;
struct pxd_lock *pxdlock;
pxd_t *pxd;
ip = tlck->ip;
mp = tlck->mp;
/* initialize as REDOPAGE/NOREDOPAGE record format */
......@@ -2894,7 +2892,6 @@ void txQuiesce(struct super_block *sb)
struct inode *ip;
struct jfs_inode_info *jfs_ip;
struct jfs_log *log = JFS_SBI(sb)->log;
int rc;
tid_t tid;
set_bit(log_QUIESCE, &log->flag);
......@@ -2914,7 +2911,7 @@ void txQuiesce(struct super_block *sb)
TXN_UNLOCK();
tid = txBegin(ip->i_sb, COMMIT_INODE | COMMIT_FORCE);
down(&jfs_ip->commit_sem);
rc = txCommit(tid, 1, &ip, 0);
txCommit(tid, 1, &ip, 0);
txEnd(tid);
up(&jfs_ip->commit_sem);
/*
......@@ -2994,8 +2991,7 @@ int jfs_sync(void *arg)
* when it is committed
*/
TXN_UNLOCK();
tid = txBegin(ip->i_sb,
COMMIT_INODE | COMMIT_FORCE);
tid = txBegin(ip->i_sb, COMMIT_INODE);
rc = txCommit(tid, 1, &ip, 0);
txEnd(tid);
up(&jfs_ip->commit_sem);
......
......@@ -3268,14 +3268,13 @@ static int xtRelink(tid_t tid, struct inode *ip, xtpage_t * p)
void xtInitRoot(tid_t tid, struct inode *ip)
{
xtpage_t *p;
struct tlock *tlck;
/*
* acquire a transaction lock on the root
*
* action:
*/
tlck = txLock(tid, ip, (struct metapage *) &JFS_IP(ip)->bxflag,
txLock(tid, ip, (struct metapage *) &JFS_IP(ip)->bxflag,
tlckXTREE | tlckNEW);
p = &JFS_IP(ip)->i_xtroot;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment