diff options
Diffstat (limited to 'fs/hfsplus/extents.c')
-rw-r--r-- | fs/hfsplus/extents.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index 12e899cd7886..fec8f61227ff 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c | |||
@@ -199,16 +199,16 @@ int hfsplus_get_block(struct inode *inode, sector_t iblock, | |||
199 | goto done; | 199 | goto done; |
200 | } | 200 | } |
201 | 201 | ||
202 | down(&HFSPLUS_I(inode).extents_lock); | 202 | mutex_lock(&HFSPLUS_I(inode).extents_lock); |
203 | res = hfsplus_ext_read_extent(inode, ablock); | 203 | res = hfsplus_ext_read_extent(inode, ablock); |
204 | if (!res) { | 204 | if (!res) { |
205 | dblock = hfsplus_ext_find_block(HFSPLUS_I(inode).cached_extents, ablock - | 205 | dblock = hfsplus_ext_find_block(HFSPLUS_I(inode).cached_extents, ablock - |
206 | HFSPLUS_I(inode).cached_start); | 206 | HFSPLUS_I(inode).cached_start); |
207 | } else { | 207 | } else { |
208 | up(&HFSPLUS_I(inode).extents_lock); | 208 | mutex_unlock(&HFSPLUS_I(inode).extents_lock); |
209 | return -EIO; | 209 | return -EIO; |
210 | } | 210 | } |
211 | up(&HFSPLUS_I(inode).extents_lock); | 211 | mutex_unlock(&HFSPLUS_I(inode).extents_lock); |
212 | 212 | ||
213 | done: | 213 | done: |
214 | dprint(DBG_EXTENT, "get_block(%lu): %llu - %u\n", inode->i_ino, (long long)iblock, dblock); | 214 | dprint(DBG_EXTENT, "get_block(%lu): %llu - %u\n", inode->i_ino, (long long)iblock, dblock); |
@@ -355,7 +355,7 @@ int hfsplus_file_extend(struct inode *inode) | |||
355 | return -ENOSPC; | 355 | return -ENOSPC; |
356 | } | 356 | } |
357 | 357 | ||
358 | down(&HFSPLUS_I(inode).extents_lock); | 358 | mutex_lock(&HFSPLUS_I(inode).extents_lock); |
359 | if (HFSPLUS_I(inode).alloc_blocks == HFSPLUS_I(inode).first_blocks) | 359 | if (HFSPLUS_I(inode).alloc_blocks == HFSPLUS_I(inode).first_blocks) |
360 | goal = hfsplus_ext_lastblock(HFSPLUS_I(inode).first_extents); | 360 | goal = hfsplus_ext_lastblock(HFSPLUS_I(inode).first_extents); |
361 | else { | 361 | else { |
@@ -408,7 +408,7 @@ int hfsplus_file_extend(struct inode *inode) | |||
408 | goto insert_extent; | 408 | goto insert_extent; |
409 | } | 409 | } |
410 | out: | 410 | out: |
411 | up(&HFSPLUS_I(inode).extents_lock); | 411 | mutex_unlock(&HFSPLUS_I(inode).extents_lock); |
412 | if (!res) { | 412 | if (!res) { |
413 | HFSPLUS_I(inode).alloc_blocks += len; | 413 | HFSPLUS_I(inode).alloc_blocks += len; |
414 | mark_inode_dirty(inode); | 414 | mark_inode_dirty(inode); |
@@ -465,7 +465,7 @@ void hfsplus_file_truncate(struct inode *inode) | |||
465 | if (blk_cnt == alloc_cnt) | 465 | if (blk_cnt == alloc_cnt) |
466 | goto out; | 466 | goto out; |
467 | 467 | ||
468 | down(&HFSPLUS_I(inode).extents_lock); | 468 | mutex_lock(&HFSPLUS_I(inode).extents_lock); |
469 | hfs_find_init(HFSPLUS_SB(sb).ext_tree, &fd); | 469 | hfs_find_init(HFSPLUS_SB(sb).ext_tree, &fd); |
470 | while (1) { | 470 | while (1) { |
471 | if (alloc_cnt == HFSPLUS_I(inode).first_blocks) { | 471 | if (alloc_cnt == HFSPLUS_I(inode).first_blocks) { |
@@ -492,7 +492,7 @@ void hfsplus_file_truncate(struct inode *inode) | |||
492 | hfs_brec_remove(&fd); | 492 | hfs_brec_remove(&fd); |
493 | } | 493 | } |
494 | hfs_find_exit(&fd); | 494 | hfs_find_exit(&fd); |
495 | up(&HFSPLUS_I(inode).extents_lock); | 495 | mutex_unlock(&HFSPLUS_I(inode).extents_lock); |
496 | 496 | ||
497 | HFSPLUS_I(inode).alloc_blocks = blk_cnt; | 497 | HFSPLUS_I(inode).alloc_blocks = blk_cnt; |
498 | out: | 498 | out: |