Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
5d04409a
Commit
5d04409a
authored
Mar 10, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Always flush write buffer in delete_dead_inodes()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
b6fc661f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
fs/bcachefs/inode.c
fs/bcachefs/inode.c
+10
-5
No files found.
fs/bcachefs/inode.c
View file @
5d04409a
...
...
@@ -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 @@ int bch2_delete_dead_inodes(struct bch_fs *c)
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment