summaryrefslogtreecommitdiff
path: root/fs/bcachefs/sysfs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-03-26 18:41:07 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-28 18:13:25 +0300
commit2dd202dbaf0acfa4af7fcdf258f35866e31f7425 (patch)
tree6cc3198b97a40379718ef6f1fc687d81f795d397 /fs/bcachefs/sysfs.c
parentc6c6a391097a6367cdbc663957010f03d9dbb361 (diff)
downloadlinux-2dd202dbaf0acfa4af7fcdf258f35866e31f7425.tar.xz
bcachefs: Recovery no longer holds state_lock
state_lock guards against devices coming or leaving, changing state, or the filesystem changing between ro <-> rw. But it's not necessary for running recovery passes, and holding it blocks asynchronous events that would cause us to go RO or kick out devices. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sysfs.c')
-rw-r--r--fs/bcachefs/sysfs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
index 251ba8224c1f..74c186d65d1f 100644
--- a/fs/bcachefs/sysfs.c
+++ b/fs/bcachefs/sysfs.c
@@ -631,8 +631,6 @@ static ssize_t sysfs_opt_store(struct bch_fs *c,
if (unlikely(!bch2_write_ref_tryget(c, BCH_WRITE_REF_sysfs)))
return -EROFS;
- down_write(&c->state_lock);
-
char *tmp = kstrdup(buf, GFP_KERNEL);
if (!tmp) {
ret = -ENOMEM;
@@ -675,7 +673,6 @@ static ssize_t sysfs_opt_store(struct bch_fs *c,
ret = size;
err:
- up_write(&c->state_lock);
bch2_write_ref_put(c, BCH_WRITE_REF_sysfs);
return ret;
}