diff options
Diffstat (limited to 'fs/bcachefs/subvolume.h')
-rw-r--r-- | fs/bcachefs/subvolume.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/bcachefs/subvolume.h b/fs/bcachefs/subvolume.h index 12a08a34e9bb..6905e91a9470 100644 --- a/fs/bcachefs/subvolume.h +++ b/fs/bcachefs/subvolume.h @@ -166,7 +166,14 @@ static inline u32 bch2_snapshot_sibling(struct bch_fs *c, u32 id) return 0; } -bool bch2_snapshot_is_ancestor(struct bch_fs *, u32, u32); +bool __bch2_snapshot_is_ancestor(struct bch_fs *, u32, u32); + +static inline bool bch2_snapshot_is_ancestor(struct bch_fs *c, u32 id, u32 ancestor) +{ + return id == ancestor + ? true + : __bch2_snapshot_is_ancestor(c, id, ancestor); +} static inline bool bch2_snapshot_has_children(struct bch_fs *c, u32 id) { |