diff options
Diffstat (limited to 'fs/ocfs2/inode.c')
| -rw-r--r-- | fs/ocfs2/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index a91ba4dec936..d4ecc0627716 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
| @@ -485,10 +485,10 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
| 485 | goto bail; | 485 | goto bail; |
| 486 | } | 486 | } |
| 487 | 487 | ||
| 488 | down(&inode_alloc_inode->i_sem); | 488 | mutex_lock(&inode_alloc_inode->i_mutex); |
| 489 | status = ocfs2_meta_lock(inode_alloc_inode, NULL, &inode_alloc_bh, 1); | 489 | status = ocfs2_meta_lock(inode_alloc_inode, NULL, &inode_alloc_bh, 1); |
| 490 | if (status < 0) { | 490 | if (status < 0) { |
| 491 | up(&inode_alloc_inode->i_sem); | 491 | mutex_unlock(&inode_alloc_inode->i_mutex); |
| 492 | 492 | ||
| 493 | mlog_errno(status); | 493 | mlog_errno(status); |
| 494 | goto bail; | 494 | goto bail; |
| @@ -536,7 +536,7 @@ bail_commit: | |||
| 536 | ocfs2_commit_trans(handle); | 536 | ocfs2_commit_trans(handle); |
| 537 | bail_unlock: | 537 | bail_unlock: |
| 538 | ocfs2_meta_unlock(inode_alloc_inode, 1); | 538 | ocfs2_meta_unlock(inode_alloc_inode, 1); |
| 539 | up(&inode_alloc_inode->i_sem); | 539 | mutex_unlock(&inode_alloc_inode->i_mutex); |
| 540 | brelse(inode_alloc_bh); | 540 | brelse(inode_alloc_bh); |
| 541 | bail: | 541 | bail: |
| 542 | iput(inode_alloc_inode); | 542 | iput(inode_alloc_inode); |
| @@ -567,10 +567,10 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
| 567 | /* Lock the orphan dir. The lock will be held for the entire | 567 | /* Lock the orphan dir. The lock will be held for the entire |
| 568 | * delete_inode operation. We do this now to avoid races with | 568 | * delete_inode operation. We do this now to avoid races with |
| 569 | * recovery completion on other nodes. */ | 569 | * recovery completion on other nodes. */ |
| 570 | down(&orphan_dir_inode->i_sem); | 570 | mutex_lock(&orphan_dir_inode->i_mutex); |
| 571 | status = ocfs2_meta_lock(orphan_dir_inode, NULL, &orphan_dir_bh, 1); | 571 | status = ocfs2_meta_lock(orphan_dir_inode, NULL, &orphan_dir_bh, 1); |
| 572 | if (status < 0) { | 572 | if (status < 0) { |
| 573 | up(&orphan_dir_inode->i_sem); | 573 | mutex_unlock(&orphan_dir_inode->i_mutex); |
| 574 | 574 | ||
| 575 | mlog_errno(status); | 575 | mlog_errno(status); |
| 576 | goto bail; | 576 | goto bail; |
| @@ -593,7 +593,7 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
| 593 | 593 | ||
| 594 | bail_unlock_dir: | 594 | bail_unlock_dir: |
| 595 | ocfs2_meta_unlock(orphan_dir_inode, 1); | 595 | ocfs2_meta_unlock(orphan_dir_inode, 1); |
| 596 | up(&orphan_dir_inode->i_sem); | 596 | mutex_unlock(&orphan_dir_inode->i_mutex); |
| 597 | brelse(orphan_dir_bh); | 597 | brelse(orphan_dir_bh); |
| 598 | bail: | 598 | bail: |
| 599 | iput(orphan_dir_inode); | 599 | iput(orphan_dir_inode); |
