]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/btree_update_leaf.c
Update bcachefs sources to 6406e05835 bcachefs: Nocow support
[bcachefs-tools-debian] / libbcachefs / btree_update_leaf.c
index b930b788410d97ca2b238e6c15e49a176208a767..05c1b28fd0889a54abac36443cac3744103f1676 100644 (file)
@@ -178,11 +178,11 @@ static int __btree_node_flush(struct journal *j, struct journal_entry_pin *pin,
                    w->journal.seq != seq)
                        break;
 
+               new &= ~BTREE_WRITE_TYPE_MASK;
+               new |= BTREE_WRITE_journal_reclaim;
                new |= 1 << BTREE_NODE_need_write;
        } while ((v = cmpxchg(&b->flags, old, new)) != old);
 
-       b->write_type = BTREE_WRITE_journal_reclaim;
-
        btree_node_write_if_need(c, b, SIX_LOCK_read);
        six_unlock_read(&b->c.lock);