Commit ae1f5623 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Mark new snapshots earlier in create path



This fixes a null ptr deref when creating new snapshots:
bch2_create_trans() will lookup the subvolume and find the _new_
snapshot in the BCH_CREATE_SUBVOL path that's being created in that
transaction.

We have to call bch2_mark_snapshot() earlier so that it's properly
initialized, instead of leaving it for transaction commit.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent e6539b0a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment