• Kent Overstreet's avatar
    bcachefs: Fix missing transaction commit · f42fa178
    Kent Overstreet authored
    In may_delete_deleted_inode(), there's a corner case when a snapshot was
    taken while we had an unlinked inode: we don't want to delete the inode
    in the internal (shared) snapshot node, since it might have been
    reattached in a descendent snapshot.
    
    Instead we propagate the key to any snapshot leaves it doesn't exist in,
    so that it can be deleted there if necessary, and then clear the
    unlinked flag in the internal node.
    
    But we forgot to commit after clearing the unlinked flag, causing us to
    go into an infinite loop.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    f42fa178
inode.c 29.9 KB