diff options
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r-- | fs/ocfs2/suballoc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index fc6d25f6d444..2f19aeec5482 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -141,7 +141,7 @@ void ocfs2_free_ac_resource(struct ocfs2_alloc_context *ac) | |||
141 | if (ac->ac_which != OCFS2_AC_USE_LOCAL) | 141 | if (ac->ac_which != OCFS2_AC_USE_LOCAL) |
142 | ocfs2_inode_unlock(inode, 1); | 142 | ocfs2_inode_unlock(inode, 1); |
143 | 143 | ||
144 | mutex_unlock(&inode->i_mutex); | 144 | inode_unlock(inode); |
145 | 145 | ||
146 | iput(inode); | 146 | iput(inode); |
147 | ac->ac_inode = NULL; | 147 | ac->ac_inode = NULL; |
@@ -797,11 +797,11 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb, | |||
797 | return -EINVAL; | 797 | return -EINVAL; |
798 | } | 798 | } |
799 | 799 | ||
800 | mutex_lock(&alloc_inode->i_mutex); | 800 | inode_lock(alloc_inode); |
801 | 801 | ||
802 | status = ocfs2_inode_lock(alloc_inode, &bh, 1); | 802 | status = ocfs2_inode_lock(alloc_inode, &bh, 1); |
803 | if (status < 0) { | 803 | if (status < 0) { |
804 | mutex_unlock(&alloc_inode->i_mutex); | 804 | inode_unlock(alloc_inode); |
805 | iput(alloc_inode); | 805 | iput(alloc_inode); |
806 | 806 | ||
807 | mlog_errno(status); | 807 | mlog_errno(status); |
@@ -2875,10 +2875,10 @@ int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res) | |||
2875 | goto bail; | 2875 | goto bail; |
2876 | } | 2876 | } |
2877 | 2877 | ||
2878 | mutex_lock(&inode_alloc_inode->i_mutex); | 2878 | inode_lock(inode_alloc_inode); |
2879 | status = ocfs2_inode_lock(inode_alloc_inode, &alloc_bh, 0); | 2879 | status = ocfs2_inode_lock(inode_alloc_inode, &alloc_bh, 0); |
2880 | if (status < 0) { | 2880 | if (status < 0) { |
2881 | mutex_unlock(&inode_alloc_inode->i_mutex); | 2881 | inode_unlock(inode_alloc_inode); |
2882 | iput(inode_alloc_inode); | 2882 | iput(inode_alloc_inode); |
2883 | mlog(ML_ERROR, "lock on alloc inode on slot %u failed %d\n", | 2883 | mlog(ML_ERROR, "lock on alloc inode on slot %u failed %d\n", |
2884 | (u32)suballoc_slot, status); | 2884 | (u32)suballoc_slot, status); |
@@ -2891,7 +2891,7 @@ int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res) | |||
2891 | mlog(ML_ERROR, "test suballoc bit failed %d\n", status); | 2891 | mlog(ML_ERROR, "test suballoc bit failed %d\n", status); |
2892 | 2892 | ||
2893 | ocfs2_inode_unlock(inode_alloc_inode, 0); | 2893 | ocfs2_inode_unlock(inode_alloc_inode, 0); |
2894 | mutex_unlock(&inode_alloc_inode->i_mutex); | 2894 | inode_unlock(inode_alloc_inode); |
2895 | 2895 | ||
2896 | iput(inode_alloc_inode); | 2896 | iput(inode_alloc_inode); |
2897 | brelse(alloc_bh); | 2897 | brelse(alloc_bh); |