aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/suballoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r--fs/ocfs2/suballoc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
index ea47120a85ff..6ad3533940ba 100644
--- a/fs/ocfs2/suballoc.c
+++ b/fs/ocfs2/suballoc.c
@@ -1199,14 +1199,24 @@ retry:
1199 inode_unlock((*ac)->ac_inode); 1199 inode_unlock((*ac)->ac_inode);
1200 1200
1201 ret = ocfs2_try_to_free_truncate_log(osb, bits_wanted); 1201 ret = ocfs2_try_to_free_truncate_log(osb, bits_wanted);
1202 if (ret == 1) 1202 if (ret == 1) {
1203 iput((*ac)->ac_inode);
1204 (*ac)->ac_inode = NULL;
1203 goto retry; 1205 goto retry;
1206 }
1204 1207
1205 if (ret < 0) 1208 if (ret < 0)
1206 mlog_errno(ret); 1209 mlog_errno(ret);
1207 1210
1208 inode_lock((*ac)->ac_inode); 1211 inode_lock((*ac)->ac_inode);
1209 ocfs2_inode_lock((*ac)->ac_inode, NULL, 1); 1212 ret = ocfs2_inode_lock((*ac)->ac_inode, NULL, 1);
1213 if (ret < 0) {
1214 mlog_errno(ret);
1215 inode_unlock((*ac)->ac_inode);
1216 iput((*ac)->ac_inode);
1217 (*ac)->ac_inode = NULL;
1218 goto bail;
1219 }
1210 } 1220 }
1211 if (status < 0) { 1221 if (status < 0) {
1212 if (status != -ENOSPC) 1222 if (status != -ENOSPC)