projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0697496
)
bcachefs: Fix potential sleeping during mount
author
Daniel J Blueman
<daniel@quora.org>
Sun, 12 Nov 2023 00:38:41 +0000
(
00:38
+0000)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Wed, 15 Nov 2023 04:44:43 +0000
(23:44 -0500)
During mount, bcachefs mount option processing may sleep while allocating a string buffer.
Fix this by reference counting in order to take the atomic path.
Signed-off-by: Daniel J Blueman <daniel@quora.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/disk_groups.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/disk_groups.c
b/fs/bcachefs/disk_groups.c
index
1f33412
..
4d0cb0c
100644
(file)
--- a/
fs/bcachefs/disk_groups.c
+++ b/
fs/bcachefs/disk_groups.c
@@
-555,6
+555,7
@@
void bch2_target_to_text(struct printbuf *out, struct bch_fs *c, unsigned v)
case TARGET_DEV: {
struct bch_dev *ca;
+ out->atomic++;
rcu_read_lock();
ca = t.dev < c->sb.nr_devices
? rcu_dereference(c->devs[t.dev])
@@
-570,6
+571,7
@@
void bch2_target_to_text(struct printbuf *out, struct bch_fs *c, unsigned v)
}
rcu_read_unlock();
+ out->atomic--;
break;
}
case TARGET_GROUP: