diff options
Diffstat (limited to 'fs/jfs/jfs_extent.c')
-rw-r--r-- | fs/jfs/jfs_extent.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c index 4879603daa1c..5549378358bf 100644 --- a/fs/jfs/jfs_extent.c +++ b/fs/jfs/jfs_extent.c | |||
@@ -94,7 +94,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr) | |||
94 | txBeginAnon(ip->i_sb); | 94 | txBeginAnon(ip->i_sb); |
95 | 95 | ||
96 | /* Avoid race with jfs_commit_inode() */ | 96 | /* Avoid race with jfs_commit_inode() */ |
97 | down(&JFS_IP(ip)->commit_sem); | 97 | mutex_lock(&JFS_IP(ip)->commit_mutex); |
98 | 98 | ||
99 | /* validate extent length */ | 99 | /* validate extent length */ |
100 | if (xlen > MAXXLEN) | 100 | if (xlen > MAXXLEN) |
@@ -136,14 +136,14 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr) | |||
136 | */ | 136 | */ |
137 | nxlen = xlen; | 137 | nxlen = xlen; |
138 | if ((rc = extBalloc(ip, hint ? hint : INOHINT(ip), &nxlen, &nxaddr))) { | 138 | if ((rc = extBalloc(ip, hint ? hint : INOHINT(ip), &nxlen, &nxaddr))) { |
139 | up(&JFS_IP(ip)->commit_sem); | 139 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
140 | return (rc); | 140 | return (rc); |
141 | } | 141 | } |
142 | 142 | ||
143 | /* Allocate blocks to quota. */ | 143 | /* Allocate blocks to quota. */ |
144 | if (DQUOT_ALLOC_BLOCK(ip, nxlen)) { | 144 | if (DQUOT_ALLOC_BLOCK(ip, nxlen)) { |
145 | dbFree(ip, nxaddr, (s64) nxlen); | 145 | dbFree(ip, nxaddr, (s64) nxlen); |
146 | up(&JFS_IP(ip)->commit_sem); | 146 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
147 | return -EDQUOT; | 147 | return -EDQUOT; |
148 | } | 148 | } |
149 | 149 | ||
@@ -165,7 +165,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr) | |||
165 | if (rc) { | 165 | if (rc) { |
166 | dbFree(ip, nxaddr, nxlen); | 166 | dbFree(ip, nxaddr, nxlen); |
167 | DQUOT_FREE_BLOCK(ip, nxlen); | 167 | DQUOT_FREE_BLOCK(ip, nxlen); |
168 | up(&JFS_IP(ip)->commit_sem); | 168 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
169 | return (rc); | 169 | return (rc); |
170 | } | 170 | } |
171 | 171 | ||
@@ -177,7 +177,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr) | |||
177 | 177 | ||
178 | mark_inode_dirty(ip); | 178 | mark_inode_dirty(ip); |
179 | 179 | ||
180 | up(&JFS_IP(ip)->commit_sem); | 180 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
181 | /* | 181 | /* |
182 | * COMMIT_SyncList flags an anonymous tlock on page that is on | 182 | * COMMIT_SyncList flags an anonymous tlock on page that is on |
183 | * sync list. | 183 | * sync list. |
@@ -222,7 +222,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, boolean_t abnr) | |||
222 | /* This blocks if we are low on resources */ | 222 | /* This blocks if we are low on resources */ |
223 | txBeginAnon(ip->i_sb); | 223 | txBeginAnon(ip->i_sb); |
224 | 224 | ||
225 | down(&JFS_IP(ip)->commit_sem); | 225 | mutex_lock(&JFS_IP(ip)->commit_mutex); |
226 | /* validate extent length */ | 226 | /* validate extent length */ |
227 | if (nxlen > MAXXLEN) | 227 | if (nxlen > MAXXLEN) |
228 | nxlen = MAXXLEN; | 228 | nxlen = MAXXLEN; |
@@ -258,7 +258,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, boolean_t abnr) | |||
258 | /* Allocat blocks to quota. */ | 258 | /* Allocat blocks to quota. */ |
259 | if (DQUOT_ALLOC_BLOCK(ip, nxlen)) { | 259 | if (DQUOT_ALLOC_BLOCK(ip, nxlen)) { |
260 | dbFree(ip, nxaddr, (s64) nxlen); | 260 | dbFree(ip, nxaddr, (s64) nxlen); |
261 | up(&JFS_IP(ip)->commit_sem); | 261 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
262 | return -EDQUOT; | 262 | return -EDQUOT; |
263 | } | 263 | } |
264 | 264 | ||
@@ -338,7 +338,7 @@ int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, boolean_t abnr) | |||
338 | 338 | ||
339 | mark_inode_dirty(ip); | 339 | mark_inode_dirty(ip); |
340 | exit: | 340 | exit: |
341 | up(&JFS_IP(ip)->commit_sem); | 341 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
342 | return (rc); | 342 | return (rc); |
343 | } | 343 | } |
344 | #endif /* _NOTYET */ | 344 | #endif /* _NOTYET */ |
@@ -439,12 +439,12 @@ int extRecord(struct inode *ip, xad_t * xp) | |||
439 | 439 | ||
440 | txBeginAnon(ip->i_sb); | 440 | txBeginAnon(ip->i_sb); |
441 | 441 | ||
442 | down(&JFS_IP(ip)->commit_sem); | 442 | mutex_lock(&JFS_IP(ip)->commit_mutex); |
443 | 443 | ||
444 | /* update the extent */ | 444 | /* update the extent */ |
445 | rc = xtUpdate(0, ip, xp); | 445 | rc = xtUpdate(0, ip, xp); |
446 | 446 | ||
447 | up(&JFS_IP(ip)->commit_sem); | 447 | mutex_unlock(&JFS_IP(ip)->commit_mutex); |
448 | return rc; | 448 | return rc; |
449 | } | 449 | } |
450 | 450 | ||