diff options
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/inode.c | 3 | ||||
-rw-r--r-- | fs/jfs/jfs_dmap.c | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_txnmgr.c | 15 | ||||
-rw-r--r-- | fs/jfs/jfs_txnmgr.h | 1 |
4 files changed, 14 insertions, 7 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 0ec62d5310db..9f942ca8e4e3 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -129,8 +129,7 @@ void jfs_delete_inode(struct inode *inode) | |||
129 | jfs_info("In jfs_delete_inode, inode = 0x%p", inode); | 129 | jfs_info("In jfs_delete_inode, inode = 0x%p", inode); |
130 | 130 | ||
131 | if (!is_bad_inode(inode) && | 131 | if (!is_bad_inode(inode) && |
132 | (JFS_IP(inode)->fileset == cpu_to_le32(FILESYSTEM_I))) { | 132 | (JFS_IP(inode)->fileset == FILESYSTEM_I)) { |
133 | |||
134 | truncate_inode_pages(&inode->i_data, 0); | 133 | truncate_inode_pages(&inode->i_data, 0); |
135 | 134 | ||
136 | if (test_cflag(COMMIT_Freewmap, inode)) | 135 | if (test_cflag(COMMIT_Freewmap, inode)) |
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index c739626f5bf1..eadf319bee22 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c | |||
@@ -3055,7 +3055,7 @@ static int cntlz(u32 value) | |||
3055 | * RETURN VALUES: | 3055 | * RETURN VALUES: |
3056 | * log2 number of blocks | 3056 | * log2 number of blocks |
3057 | */ | 3057 | */ |
3058 | int blkstol2(s64 nb) | 3058 | static int blkstol2(s64 nb) |
3059 | { | 3059 | { |
3060 | int l2nb; | 3060 | int l2nb; |
3061 | s64 mask; /* meant to be signed */ | 3061 | s64 mask; /* meant to be signed */ |
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index c7a92f9deb2b..9b71ed2674fe 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c | |||
@@ -725,6 +725,9 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, | |||
725 | else | 725 | else |
726 | tlck->flag = tlckINODELOCK; | 726 | tlck->flag = tlckINODELOCK; |
727 | 727 | ||
728 | if (S_ISDIR(ip->i_mode)) | ||
729 | tlck->flag |= tlckDIRECTORY; | ||
730 | |||
728 | tlck->type = 0; | 731 | tlck->type = 0; |
729 | 732 | ||
730 | /* bind the tlock and the page */ | 733 | /* bind the tlock and the page */ |
@@ -1009,6 +1012,8 @@ struct tlock *txMaplock(tid_t tid, struct inode *ip, int type) | |||
1009 | 1012 | ||
1010 | /* bind the tlock and the object */ | 1013 | /* bind the tlock and the object */ |
1011 | tlck->flag = tlckINODELOCK; | 1014 | tlck->flag = tlckINODELOCK; |
1015 | if (S_ISDIR(ip->i_mode)) | ||
1016 | tlck->flag |= tlckDIRECTORY; | ||
1012 | tlck->ip = ip; | 1017 | tlck->ip = ip; |
1013 | tlck->mp = NULL; | 1018 | tlck->mp = NULL; |
1014 | 1019 | ||
@@ -1077,6 +1082,8 @@ struct linelock *txLinelock(struct linelock * tlock) | |||
1077 | linelock->flag = tlckLINELOCK; | 1082 | linelock->flag = tlckLINELOCK; |
1078 | linelock->maxcnt = TLOCKLONG; | 1083 | linelock->maxcnt = TLOCKLONG; |
1079 | linelock->index = 0; | 1084 | linelock->index = 0; |
1085 | if (tlck->flag & tlckDIRECTORY) | ||
1086 | linelock->flag |= tlckDIRECTORY; | ||
1080 | 1087 | ||
1081 | /* append linelock after tlock */ | 1088 | /* append linelock after tlock */ |
1082 | linelock->next = tlock->next; | 1089 | linelock->next = tlock->next; |
@@ -2070,8 +2077,8 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | |||
2070 | * | 2077 | * |
2071 | * function: log from maplock of freed data extents; | 2078 | * function: log from maplock of freed data extents; |
2072 | */ | 2079 | */ |
2073 | void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | 2080 | static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, |
2074 | struct tlock * tlck) | 2081 | struct tlock * tlck) |
2075 | { | 2082 | { |
2076 | struct pxd_lock *pxdlock; | 2083 | struct pxd_lock *pxdlock; |
2077 | int i, nlock; | 2084 | int i, nlock; |
@@ -2209,7 +2216,7 @@ void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea) | |||
2209 | * function: synchronously write pages locked by transaction | 2216 | * function: synchronously write pages locked by transaction |
2210 | * after txLog() but before txUpdateMap(); | 2217 | * after txLog() but before txUpdateMap(); |
2211 | */ | 2218 | */ |
2212 | void txForce(struct tblock * tblk) | 2219 | static void txForce(struct tblock * tblk) |
2213 | { | 2220 | { |
2214 | struct tlock *tlck; | 2221 | struct tlock *tlck; |
2215 | lid_t lid, next; | 2222 | lid_t lid, next; |
@@ -2358,7 +2365,7 @@ static void txUpdateMap(struct tblock * tblk) | |||
2358 | */ | 2365 | */ |
2359 | else { /* (maplock->flag & mlckFREE) */ | 2366 | else { /* (maplock->flag & mlckFREE) */ |
2360 | 2367 | ||
2361 | if (S_ISDIR(tlck->ip->i_mode)) | 2368 | if (tlck->flag & tlckDIRECTORY) |
2362 | txFreeMap(ipimap, maplock, | 2369 | txFreeMap(ipimap, maplock, |
2363 | tblk, COMMIT_PWMAP); | 2370 | tblk, COMMIT_PWMAP); |
2364 | else | 2371 | else |
diff --git a/fs/jfs/jfs_txnmgr.h b/fs/jfs/jfs_txnmgr.h index 59ad0f6b7231..0e4dc4514c47 100644 --- a/fs/jfs/jfs_txnmgr.h +++ b/fs/jfs/jfs_txnmgr.h | |||
@@ -122,6 +122,7 @@ extern struct tlock *TxLock; /* transaction lock table */ | |||
122 | #define tlckLOG 0x0800 | 122 | #define tlckLOG 0x0800 |
123 | /* updateMap state */ | 123 | /* updateMap state */ |
124 | #define tlckUPDATEMAP 0x0080 | 124 | #define tlckUPDATEMAP 0x0080 |
125 | #define tlckDIRECTORY 0x0040 | ||
125 | /* freeLock state */ | 126 | /* freeLock state */ |
126 | #define tlckFREELOCK 0x0008 | 127 | #define tlckFREELOCK 0x0008 |
127 | #define tlckWRITEPAGE 0x0004 | 128 | #define tlckWRITEPAGE 0x0004 |