Skip to content

Commit b398156

Browse files
author
Kent Overstreet
committed
bcachefs: Clear fs_path_parent on subvolume unlink
This fixes recursive subvolume removal. Subvolume deletion is asynchronous; fs_path_parent, and thus the entry in the subvolume_children btree, need to be cleared when the subvolume is unlinked from the fs heirarchy - else we'll spuriously think a subvolume has children and deletion will fail. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 63c3b8f commit b398156

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/bcachefs/subvolume.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,7 @@ int bch2_subvolume_unlink(struct btree_trans *trans, u32 subvolid)
561561
}
562562

563563
SET_BCH_SUBVOLUME_UNLINKED(&n->v, true);
564+
n->v.fs_path_parent = 0;
564565
bch2_trans_iter_exit(trans, &iter);
565566
return ret;
566567
}

0 commit comments

Comments
 (0)