File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1181,6 +1181,15 @@ int bch2_delete_dead_inodes(struct bch_fs *c)
1181
1181
bool need_another_pass ;
1182
1182
int ret ;
1183
1183
again :
1184
+ /*
1185
+ * if we ran check_inodes() unlinked inodes will have already been
1186
+ * cleaned up but the write buffer will be out of sync; therefore we
1187
+ * alway need a write buffer flush
1188
+ */
1189
+ ret = bch2_btree_write_buffer_flush_sync (trans );
1190
+ if (ret )
1191
+ goto err ;
1192
+
1184
1193
need_another_pass = false;
1185
1194
1186
1195
/*
@@ -1213,12 +1222,8 @@ int bch2_delete_dead_inodes(struct bch_fs *c)
1213
1222
ret ;
1214
1223
}));
1215
1224
1216
- if (!ret && need_another_pass ) {
1217
- ret = bch2_btree_write_buffer_flush_sync (trans );
1218
- if (ret )
1219
- goto err ;
1225
+ if (!ret && need_another_pass )
1220
1226
goto again ;
1221
- }
1222
1227
err :
1223
1228
bch2_trans_put (trans );
1224
1229
return ret ;
You can’t perform that action at this time.
0 commit comments