diff options
author | 2025-03-29 17:59:50 -0400 | |
---|---|---|
committer | 2025-03-29 20:16:49 -0400 | |
commit | b3981564ca8fa341a57c16dcbed1a9bd7f4e3be1 (patch) | |
tree | 5714ac2f5fa81aedcd04212e058d8a34f76ab5e1 /fs/bcachefs/subvolume.c | |
parent | bcachefs: Change btree_insert_node() assertion to error (diff) | |
download | wireguard-linux-b3981564ca8fa341a57c16dcbed1a9bd7f4e3be1.tar.xz wireguard-linux-b3981564ca8fa341a57c16dcbed1a9bd7f4e3be1.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/subvolume.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c index b7b96283c316..cd0d8e5e44e7 100644 --- a/fs/bcachefs/subvolume.c +++ b/fs/bcachefs/subvolume.c @@ -561,6 +561,7 @@ int bch2_subvolume_unlink(struct btree_trans *trans, u32 subvolid) } SET_BCH_SUBVOLUME_UNLINKED(&n->v, true); + n->v.fs_path_parent = 0; bch2_trans_iter_exit(trans, &iter); return ret; } |