bcachefs: Fix a memory splat
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 18 Dec 2019 22:34:36 +0000 (17:34 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:33 +0000 (17:08 -0400)
commit187c71f6ab439582c80433ef9e04f615b8c0f576
treeae1be6c73ecc0326718e3f96fd817ac079ae3049
parent22502ac23a2eaa3714b77d4a9242df352a9cd0c0
bcachefs: Fix a memory splat

In __bch2_sb_field_resize, when a field's old a new size was 0, we were
doing an invalid write just past the end of the superblock.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/super-io.c