Loading fs/jfs/jfs_txnmgr.c +8 −1 Original line number Original line Diff line number Diff line Loading @@ -725,6 +725,9 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, else else tlck->flag = tlckINODELOCK; tlck->flag = tlckINODELOCK; if (S_ISDIR(ip->i_mode)) tlck->flag |= tlckDIRECTORY; tlck->type = 0; tlck->type = 0; /* bind the tlock and the page */ /* bind the tlock and the page */ Loading Loading @@ -1009,6 +1012,8 @@ struct tlock *txMaplock(tid_t tid, struct inode *ip, int type) /* bind the tlock and the object */ /* bind the tlock and the object */ tlck->flag = tlckINODELOCK; tlck->flag = tlckINODELOCK; if (S_ISDIR(ip->i_mode)) tlck->flag |= tlckDIRECTORY; tlck->ip = ip; tlck->ip = ip; tlck->mp = NULL; tlck->mp = NULL; Loading Loading @@ -1077,6 +1082,8 @@ struct linelock *txLinelock(struct linelock * tlock) linelock->flag = tlckLINELOCK; linelock->flag = tlckLINELOCK; linelock->maxcnt = TLOCKLONG; linelock->maxcnt = TLOCKLONG; linelock->index = 0; linelock->index = 0; if (tlck->flag & tlckDIRECTORY) linelock->flag |= tlckDIRECTORY; /* append linelock after tlock */ /* append linelock after tlock */ linelock->next = tlock->next; linelock->next = tlock->next; Loading Loading @@ -2358,7 +2365,7 @@ static void txUpdateMap(struct tblock * tblk) */ */ else { /* (maplock->flag & mlckFREE) */ else { /* (maplock->flag & mlckFREE) */ if (S_ISDIR(tlck->ip->i_mode)) if (tlck->flag & tlckDIRECTORY) txFreeMap(ipimap, maplock, txFreeMap(ipimap, maplock, tblk, COMMIT_PWMAP); tblk, COMMIT_PWMAP); else else Loading fs/jfs/jfs_txnmgr.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -122,6 +122,7 @@ extern struct tlock *TxLock; /* transaction lock table */ #define tlckLOG 0x0800 #define tlckLOG 0x0800 /* updateMap state */ /* updateMap state */ #define tlckUPDATEMAP 0x0080 #define tlckUPDATEMAP 0x0080 #define tlckDIRECTORY 0x0040 /* freeLock state */ /* freeLock state */ #define tlckFREELOCK 0x0008 #define tlckFREELOCK 0x0008 #define tlckWRITEPAGE 0x0004 #define tlckWRITEPAGE 0x0004 Loading Loading
fs/jfs/jfs_txnmgr.c +8 −1 Original line number Original line Diff line number Diff line Loading @@ -725,6 +725,9 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, else else tlck->flag = tlckINODELOCK; tlck->flag = tlckINODELOCK; if (S_ISDIR(ip->i_mode)) tlck->flag |= tlckDIRECTORY; tlck->type = 0; tlck->type = 0; /* bind the tlock and the page */ /* bind the tlock and the page */ Loading Loading @@ -1009,6 +1012,8 @@ struct tlock *txMaplock(tid_t tid, struct inode *ip, int type) /* bind the tlock and the object */ /* bind the tlock and the object */ tlck->flag = tlckINODELOCK; tlck->flag = tlckINODELOCK; if (S_ISDIR(ip->i_mode)) tlck->flag |= tlckDIRECTORY; tlck->ip = ip; tlck->ip = ip; tlck->mp = NULL; tlck->mp = NULL; Loading Loading @@ -1077,6 +1082,8 @@ struct linelock *txLinelock(struct linelock * tlock) linelock->flag = tlckLINELOCK; linelock->flag = tlckLINELOCK; linelock->maxcnt = TLOCKLONG; linelock->maxcnt = TLOCKLONG; linelock->index = 0; linelock->index = 0; if (tlck->flag & tlckDIRECTORY) linelock->flag |= tlckDIRECTORY; /* append linelock after tlock */ /* append linelock after tlock */ linelock->next = tlock->next; linelock->next = tlock->next; Loading Loading @@ -2358,7 +2365,7 @@ static void txUpdateMap(struct tblock * tblk) */ */ else { /* (maplock->flag & mlckFREE) */ else { /* (maplock->flag & mlckFREE) */ if (S_ISDIR(tlck->ip->i_mode)) if (tlck->flag & tlckDIRECTORY) txFreeMap(ipimap, maplock, txFreeMap(ipimap, maplock, tblk, COMMIT_PWMAP); tblk, COMMIT_PWMAP); else else Loading
fs/jfs/jfs_txnmgr.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -122,6 +122,7 @@ extern struct tlock *TxLock; /* transaction lock table */ #define tlckLOG 0x0800 #define tlckLOG 0x0800 /* updateMap state */ /* updateMap state */ #define tlckUPDATEMAP 0x0080 #define tlckUPDATEMAP 0x0080 #define tlckDIRECTORY 0x0040 /* freeLock state */ /* freeLock state */ #define tlckFREELOCK 0x0008 #define tlckFREELOCK 0x0008 #define tlckWRITEPAGE 0x0004 #define tlckWRITEPAGE 0x0004 Loading