Commit cb311ab3 authored by Linus Torvalds's avatar Linus Torvalds

Automerge

parents e5959d66 db468b69
......@@ -185,9 +185,7 @@ static void lbmWrite(log_t * log, lbuf_t * bp, int flag, int cant_block);
static void lbmDirectWrite(log_t * log, lbuf_t * bp, int flag);
static int lbmIOWait(lbuf_t * bp, int flag);
static bio_end_io_t lbmIODone;
#ifdef _STILL_TO_PORT
static void lbmDirectIODone(iobuf_t * ddbp);
#endif /* _STILL_TO_PORT */
void lbmStartIO(lbuf_t * bp);
void lmGCwrite(log_t * log, int cant_block);
......@@ -1810,42 +1808,6 @@ static void lbmfree(lbuf_t * bp)
}
#ifdef _THIS_IS_NOT_USED
/*
* lbmRelease()
*
* remove the log buffer from log device write queue;
*/
static void lbmRelease(log_t * log, uint flag)
{
lbuf_t *bp, *tail;
unsigned long flags;
bp = log->bp;
LCACHE_LOCK(flags);
tail = log->wqueue;
/* single element queue */
if (bp == tail) {
log->wqueue = NULL;
bp->l_wqnext = NULL;
}
/* multi element queue */
else {
tail->l_wqnext = bp->l_wqnext;
bp->l_wqnext = NULL;
}
if (flag & lbmFREE)
lbmfree(bp);
LCACHE_UNLOCK(flags);
}
#endif /* _THIS_IS_NOT_USED */
/*
* NAME: lbmRedrive
*
......@@ -2272,63 +2234,6 @@ int jfsIOWait(void *arg)
}
#ifdef _STILL_TO_PORT
/*
* lbmDirectIODone()
*
* iodone() for lbmDirectWrite() to bypass write queue;
* executed at INTIODONE level;
*/
static void lbmDirectIODone(iobuf_t * iobp)
{
lbuf_t *bp;
unsigned long flags;
/*
* get back jfs buffer bound to the io buffer
*/
bp = (lbuf_t *) iobp->b_jfsbp;
jEVENT(0,
("lbmDirectIODone: bp:0x%p flag:0x%x\n", bp, bp->l_flag));
LCACHE_LOCK(flags); /* disable+lock */
bp->l_flag |= lbmDONE;
if (iobp->b_flags & B_ERROR) {
bp->l_flag |= lbmERROR;
#ifdef _JFS_OS2
SysLogError();
#endif
}
/*
* pageout completion
*/
bp->l_flag &= ~lbmWRITE;
/*
* synchronous pageout:
*/
if (bp->l_flag & lbmSYNC) {
LCACHE_UNLOCK(flags); /* unlock+enable */
/* wakeup I/O initiator */
LCACHE_WAKEUP(&bp->l_ioevent);
}
/*
* asynchronous pageout:
*/
else {
assert(bp->l_flag & lbmRELEASE);
assert(bp->l_flag & lbmFREE);
lbmfree(bp);
LCACHE_UNLOCK(flags); /* unlock+enable */
}
}
#endif /* _STILL_TO_PORT */
#ifdef _STILL_TO_PORT
/*
* NAME: lmLogFormat()/jfs_logform()
......
......@@ -587,7 +587,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
*/
s64 commitZeroLink(tid_t tid, struct inode *ip)
{
int filetype, committype;
int filetype;
tblock_t *tblk;
jFYI(1, ("commitZeroLink: tid = %d, ip = 0x%p\n", tid, ip));
......@@ -608,67 +608,26 @@ s64 commitZeroLink(tid_t tid, struct inode *ip)
return 0;
}
#ifdef _STILL_TO_PORT
/*
* free from block allocation map:
*
* if there is no cache control element associated with
* the file, free resources in both persistent and work map;
* otherwise just persistent map.
*/
if (ip->i_cacheid) {
committype = COMMIT_PMAP;
/* mark for iClose() to free from working map */
set_cflag(COMMIT_Freewmap, ip);
} else
committype = COMMIT_PWMAP;
#else /* _STILL_TO_PORT */
set_cflag(COMMIT_Freewmap, ip);
committype = COMMIT_PMAP;
#endif /* _STILL_TO_PORT */
/* mark transaction of block map update type */
tblk = tid_to_tblock(tid);
tblk->xflag |= committype;
tblk->xflag |= COMMIT_PMAP;
/*
* free EA
*/
if (JFS_IP(ip)->ea.flag & DXD_EXTENT) {
#ifdef _STILL_TO_PORT
/* free EA pages from cache */
if (committype == COMMIT_PWMAP)
bmExtentInvalidate(ip, addressDXD(&ip->i_ea),
lengthDXD(&ip->i_ea));
#endif /* _STILL_TO_PORT */
if (JFS_IP(ip)->ea.flag & DXD_EXTENT)
/* acquire maplock on EA to be freed from block map */
txEA(tid, ip, &JFS_IP(ip)->ea, NULL);
if (committype == COMMIT_PWMAP)
JFS_IP(ip)->ea.flag = 0;
}
/*
* free ACL
*/
if (JFS_IP(ip)->acl.flag & DXD_EXTENT) {
#ifdef _STILL_TO_PORT
/* free ACL pages from cache */
if (committype == COMMIT_PWMAP)
bmExtentInvalidate(ip, addressDXD(&ip->i_acl),
lengthDXD(&ip->i_acl));
#endif /* _STILL_TO_PORT */
if (JFS_IP(ip)->acl.flag & DXD_EXTENT)
/* acquire maplock on EA to be freed from block map */
txEA(tid, ip, &JFS_IP(ip)->acl, NULL);
if (committype == COMMIT_PWMAP)
JFS_IP(ip)->acl.flag = 0;
}
/*
* free xtree/data (truncate to zero length):
* free xtree/data pages from cache if COMMIT_PWMAP,
......
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