diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 11:12:14 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-31 12:18:37 -0400 |
commit | e677179b35b7ecbe3cefe33011b69d45171e5e9f (patch) | |
tree | ac09673fe202f01873a29f8ce7d23cabe2d780ac /fs/bcachefs/sysfs.c | |
parent | 37707bb183b4746f27b0beaf0c3273fd7c79dc66 (diff) | |
download | linux-e677179b35b7ecbe3cefe33011b69d45171e5e9f.tar.gz linux-e677179b35b7ecbe3cefe33011b69d45171e5e9f.tar.bz2 linux-e677179b35b7ecbe3cefe33011b69d45171e5e9f.zip |
bcachefs: bch2_disk_path_to_text() no longer takes sb_lock
We're going to be using bch2_target_to_text() ->
bch2_disk_path_to_text() from bch2_bkey_ptrs_to_text() and
bch2_bkey_ptrs_invalid(), which can be called in any context.
This patch adds the actual label to bch_disk_group_cpu so that it can be
used by bch2_disk_path_to_text, and splits out bch2_disk_path_to_text()
into two variants - like the previous patch, one for when we have a
running filesystem and another for when we only have a superblock.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sysfs.c')
-rw-r--r-- | fs/bcachefs/sysfs.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c index 5b079369af95..3ac6634020d1 100644 --- a/fs/bcachefs/sysfs.c +++ b/fs/bcachefs/sysfs.c @@ -910,13 +910,8 @@ SHOW(bch2_dev) sysfs_print(discard, ca->mi.discard); if (attr == &sysfs_label) { - if (ca->mi.group) { - mutex_lock(&c->sb_lock); - bch2_disk_path_to_text(out, c->disk_sb.sb, - ca->mi.group - 1); - mutex_unlock(&c->sb_lock); - } - + if (ca->mi.group) + bch2_disk_path_to_text(out, c, ca->mi.group - 1); prt_char(out, '\n'); } |