summaryrefslogtreecommitdiff
path: root/libbcachefs/snapshot.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/snapshot.h')
-rw-r--r--libbcachefs/snapshot.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbcachefs/snapshot.h b/libbcachefs/snapshot.h
index 6766bf67..6dcb118b 100644
--- a/libbcachefs/snapshot.h
+++ b/libbcachefs/snapshot.h
@@ -128,7 +128,7 @@ static inline int bch2_snapshot_is_internal_node(struct bch_fs *c, u32 id)
{
guard(rcu)();
const struct snapshot_t *s = snapshot_t(c, id);
- return s ? s->children[0] : -BCH_ERR_invalid_snapshot_node;
+ return s ? s->children[0] : bch_err_throw(c, invalid_snapshot_node);
}
static inline int bch2_snapshot_is_leaf(struct bch_fs *c, u32 id)