summaryrefslogtreecommitdiff
path: root/libbcachefs/disk_groups.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-11-12 20:53:57 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-11-12 20:57:28 -0500
commit7fd6c3ffe45b3b42c0bc8a8c5d1387a5e3316a54 (patch)
treed596299da8c34dff74cb13caf9dd47d9154c25b4 /libbcachefs/disk_groups.c
parenta613340b26ad88801666362d2824118396f34c38 (diff)
Update bcachefs sources to 3ca08ab51ec9 bcachefs: six locks: Simplify optimistic spinning
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/disk_groups.c')
-rw-r--r--libbcachefs/disk_groups.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbcachefs/disk_groups.c b/libbcachefs/disk_groups.c
index d613695a..4d0cb0cc 100644
--- a/libbcachefs/disk_groups.c
+++ b/libbcachefs/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:
@@ -580,7 +582,7 @@ void bch2_target_to_text(struct printbuf *out, struct bch_fs *c, unsigned v)
}
}
-void bch2_target_to_text_sb(struct printbuf *out, struct bch_sb *sb, unsigned v)
+static void bch2_target_to_text_sb(struct printbuf *out, struct bch_sb *sb, unsigned v)
{
struct target t = target_decode(v);