bcachefs: Fix an assertion in bch2_truncate()
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 16 Dec 2021 01:35:45 +0000 (20:35 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:18 +0000 (17:09 -0400)
commit51c4e406aa5706cdb224ff16eef1d560c504c3ac
tree1a2e25a3f385f6bc5b8019dcef7a3f5b485a76ac
parent2a863c6c80e3c14eb3920c0d8474ba112c82197a
bcachefs: Fix an assertion in bch2_truncate()

We recently added an assertion that when we truncate a file to 0,
i_blocks should also go to 0 - but that's not necessarily true if we're
doing an emergency shutdown, lots of invariants no longer hold true in
that case.

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