diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-10-14 11:22:05 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-10-14 11:22:05 -0400 |
commit | 2b8c1fc5c9f91486222097451a4722550f5c5db1 (patch) | |
tree | 5d2b86a200e83df449a77e72d30810b183571b4b /libbcachefs/reflink.c | |
parent | e489658c490524a921bc30474fa54d55aa8867c4 (diff) |
Update bcachefs sources to 710cd382bf bcachefs: Fix for leaking of reflinked extents
Diffstat (limited to 'libbcachefs/reflink.c')
-rw-r--r-- | libbcachefs/reflink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libbcachefs/reflink.c b/libbcachefs/reflink.c index 92ff6094..8726943a 100644 --- a/libbcachefs/reflink.c +++ b/libbcachefs/reflink.c @@ -32,6 +32,9 @@ const char *bch2_reflink_p_invalid(const struct bch_fs *c, struct bkey_s_c k) if (bkey_val_bytes(p.k) != sizeof(*p.v)) return "incorrect value size"; + if (le64_to_cpu(p.v->idx) < le32_to_cpu(p.v->front_pad)) + return "idx < front_pad"; + return NULL; } |