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
053dbb37
Commit
053dbb37
authored
Feb 11, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Fix a locking bug
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
66393392
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.c
+1
-0
fs/bcachefs/btree_update_leaf.c
fs/bcachefs/btree_update_leaf.c
+3
-0
No files found.
fs/bcachefs/alloc_background.c
View file @
053dbb37
...
@@ -883,6 +883,7 @@ static int bch2_invalidate_buckets(struct bch_fs *c, struct bch_dev *ca)
...
@@ -883,6 +883,7 @@ static int bch2_invalidate_buckets(struct bch_fs *c, struct bch_dev *ca)
ret
=
__bch2_alloc_write_key
(
c
,
ca
,
b
,
&
iter
,
ret
=
__bch2_alloc_write_key
(
c
,
ca
,
b
,
&
iter
,
must_flush
?
&
journal_seq
:
NULL
,
must_flush
?
&
journal_seq
:
NULL
,
BTREE_INSERT_GC_LOCK_HELD
|
!
fifo_empty
(
&
ca
->
free_inc
)
?
BTREE_INSERT_NOWAIT
:
0
);
!
fifo_empty
(
&
ca
->
free_inc
)
?
BTREE_INSERT_NOWAIT
:
0
);
}
}
...
...
fs/bcachefs/btree_update_leaf.c
View file @
053dbb37
...
@@ -624,6 +624,9 @@ int __bch2_btree_insert_at(struct btree_insert *trans)
...
@@ -624,6 +624,9 @@ int __bch2_btree_insert_at(struct btree_insert *trans)
/* for the sake of sanity: */
/* for the sake of sanity: */
BUG_ON
(
trans
->
nr
>
1
&&
!
(
trans
->
flags
&
BTREE_INSERT_ATOMIC
));
BUG_ON
(
trans
->
nr
>
1
&&
!
(
trans
->
flags
&
BTREE_INSERT_ATOMIC
));
if
(
trans
->
flags
&
BTREE_INSERT_GC_LOCK_HELD
)
lockdep_assert_held
(
&
c
->
gc_lock
);
bubble_sort
(
trans
->
entries
,
trans
->
nr
,
btree_trans_cmp
);
bubble_sort
(
trans
->
entries
,
trans
->
nr
,
btree_trans_cmp
);
trans_for_each_entry
(
trans
,
i
)
trans_for_each_entry
(
trans
,
i
)
...
...
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