summaryrefslogtreecommitdiff
path: root/fs/bcachefs/sysfs.c
diff options
context:
space:
mode:
authorTorge Matthies <openglfreak@googlemail.com>2023-09-21 23:25:54 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:15 -0400
commitd8b6f8c3c6fe7eb279d031c5f7bdde086185f0d1 (patch)
tree47284d6941a9f7e6b48c24e57985d2a4c7244da3 /fs/bcachefs/sysfs.c
parent7239f8e0ee7fb0504d18b9570172688684f3606d (diff)
bcachefs: Fix changing durability using sysfs
Signed-off-by: Torge Matthies <openglfreak@googlemail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sysfs.c')
-rw-r--r--fs/bcachefs/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
index 03dbea4d95ce..b700be5b6664 100644
--- a/fs/bcachefs/sysfs.c
+++ b/fs/bcachefs/sysfs.c
@@ -977,7 +977,7 @@ STORE(bch2_dev)
mutex_lock(&c->sb_lock);
mi = &bch2_sb_get_members(c->disk_sb.sb)->members[ca->dev_idx];
- if (v != BCH_MEMBER_DURABILITY(mi)) {
+ if (v + 1 != BCH_MEMBER_DURABILITY(mi)) {
SET_BCH_MEMBER_DURABILITY(mi, v + 1);
bch2_write_super(c);
}