aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/jfs_imap.c')
-rw-r--r--fs/jfs/jfs_imap.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index 31b4aa13dd4b..87dd86c34c22 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -66,14 +66,14 @@ static HLIST_HEAD(aggregate_hash);
66 * imap locks 66 * imap locks
67 */ 67 */
68/* iag free list lock */ 68/* iag free list lock */
69#define IAGFREE_LOCK_INIT(imap) init_MUTEX(&imap->im_freelock) 69#define IAGFREE_LOCK_INIT(imap) mutex_init(&imap->im_freelock)
70#define IAGFREE_LOCK(imap) down(&imap->im_freelock) 70#define IAGFREE_LOCK(imap) mutex_lock(&imap->im_freelock)
71#define IAGFREE_UNLOCK(imap) up(&imap->im_freelock) 71#define IAGFREE_UNLOCK(imap) mutex_unlock(&imap->im_freelock)
72 72
73/* per ag iag list locks */ 73/* per ag iag list locks */
74#define AG_LOCK_INIT(imap,index) init_MUTEX(&(imap->im_aglock[index])) 74#define AG_LOCK_INIT(imap,index) mutex_init(&(imap->im_aglock[index]))
75#define AG_LOCK(imap,agno) down(&imap->im_aglock[agno]) 75#define AG_LOCK(imap,agno) mutex_lock(&imap->im_aglock[agno])
76#define AG_UNLOCK(imap,agno) up(&imap->im_aglock[agno]) 76#define AG_UNLOCK(imap,agno) mutex_unlock(&imap->im_aglock[agno])
77 77
78/* 78/*
79 * forward references 79 * forward references
@@ -1261,7 +1261,7 @@ int diFree(struct inode *ip)
1261 * to be freed by the transaction; 1261 * to be freed by the transaction;
1262 */ 1262 */
1263 tid = txBegin(ipimap->i_sb, COMMIT_FORCE); 1263 tid = txBegin(ipimap->i_sb, COMMIT_FORCE);
1264 down(&JFS_IP(ipimap)->commit_sem); 1264 mutex_lock(&JFS_IP(ipimap)->commit_mutex);
1265 1265
1266 /* acquire tlock of the iag page of the freed ixad 1266 /* acquire tlock of the iag page of the freed ixad
1267 * to force the page NOHOMEOK (even though no data is 1267 * to force the page NOHOMEOK (even though no data is
@@ -1294,7 +1294,7 @@ int diFree(struct inode *ip)
1294 rc = txCommit(tid, 1, &iplist[0], COMMIT_FORCE); 1294 rc = txCommit(tid, 1, &iplist[0], COMMIT_FORCE);
1295 1295
1296 txEnd(tid); 1296 txEnd(tid);
1297 up(&JFS_IP(ipimap)->commit_sem); 1297 mutex_unlock(&JFS_IP(ipimap)->commit_mutex);
1298 1298
1299 /* unlock the AG inode map information */ 1299 /* unlock the AG inode map information */
1300 AG_UNLOCK(imap, agno); 1300 AG_UNLOCK(imap, agno);
@@ -2554,13 +2554,13 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
2554 * addressing structure pointing to the new iag page; 2554 * addressing structure pointing to the new iag page;
2555 */ 2555 */
2556 tid = txBegin(sb, COMMIT_FORCE); 2556 tid = txBegin(sb, COMMIT_FORCE);
2557 down(&JFS_IP(ipimap)->commit_sem); 2557 mutex_lock(&JFS_IP(ipimap)->commit_mutex);
2558 2558
2559 /* update the inode map addressing structure to point to it */ 2559 /* update the inode map addressing structure to point to it */
2560 if ((rc = 2560 if ((rc =
2561 xtInsert(tid, ipimap, 0, blkno, xlen, &xaddr, 0))) { 2561 xtInsert(tid, ipimap, 0, blkno, xlen, &xaddr, 0))) {
2562 txEnd(tid); 2562 txEnd(tid);
2563 up(&JFS_IP(ipimap)->commit_sem); 2563 mutex_unlock(&JFS_IP(ipimap)->commit_mutex);
2564 /* Free the blocks allocated for the iag since it was 2564 /* Free the blocks allocated for the iag since it was
2565 * not successfully added to the inode map 2565 * not successfully added to the inode map
2566 */ 2566 */
@@ -2626,7 +2626,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
2626 rc = txCommit(tid, 1, &iplist[0], COMMIT_FORCE); 2626 rc = txCommit(tid, 1, &iplist[0], COMMIT_FORCE);
2627 2627
2628 txEnd(tid); 2628 txEnd(tid);
2629 up(&JFS_IP(ipimap)->commit_sem); 2629 mutex_unlock(&JFS_IP(ipimap)->commit_mutex);
2630 2630
2631 duplicateIXtree(sb, blkno, xlen, &xaddr); 2631 duplicateIXtree(sb, blkno, xlen, &xaddr);
2632 2632