diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-16 19:29:22 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-16 19:40:33 -0400 |
commit | abfdc593a532abaa40ac6ca87c1e0c86459f8c87 (patch) | |
tree | 4db627c2564af70a98c53c5747e543a7b04465c2 /libbcachefs/inode.c | |
parent | f1e87c66af3ab12ba7bdb0cc61436c8263e08c85 (diff) |
Update bcachefs sources to 83338f5b2cb8 bcachefs: fix for building in userspace
Diffstat (limited to 'libbcachefs/inode.c')
-rw-r--r-- | libbcachefs/inode.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libbcachefs/inode.c b/libbcachefs/inode.c index a3139bb6..2b5e0677 100644 --- a/libbcachefs/inode.c +++ b/libbcachefs/inode.c @@ -1181,6 +1181,15 @@ int bch2_delete_dead_inodes(struct bch_fs *c) bool need_another_pass; int ret; again: + /* + * if we ran check_inodes() unlinked inodes will have already been + * cleaned up but the write buffer will be out of sync; therefore we + * alway need a write buffer flush + */ + ret = bch2_btree_write_buffer_flush_sync(trans); + if (ret) + goto err; + need_another_pass = false; /* @@ -1213,12 +1222,8 @@ again: ret; })); - if (!ret && need_another_pass) { - ret = bch2_btree_write_buffer_flush_sync(trans); - if (ret) - goto err; + if (!ret && need_another_pass) goto again; - } err: bch2_trans_put(trans); return ret; |