Signed-off-by: Kent Overstreet <[email protected]>
---
 fs/bcachefs/sysfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
index 4c5b585041be..b01b2ae87051 100644
--- a/fs/bcachefs/sysfs.c
+++ b/fs/bcachefs/sysfs.c
@@ -650,6 +650,7 @@ static ssize_t sysfs_opt_store(struct bch_fs *c,
 
        if (v &&
            (id == Opt_background_target ||
+            (id == Opt_foreground_target && !c->opts.background_target) ||
             id == Opt_background_compression ||
             (id == Opt_compression && !c->opts.background_compression)))
                bch2_set_rebalance_needs_scan(c, 0);
-- 
2.49.0


Reply via email to