]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fs: assert on ->i_count in iput_final()
authorMateusz Guzik <mjguzik@gmail.com>
Wed, 1 Oct 2025 01:00:10 +0000 (03:00 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 20 Oct 2025 18:22:25 +0000 (20:22 +0200)
commitbe97a4b63ca8c3ed8f5c3f5606a15a8379c78afb
tree100d145c595885eac56d969ad9555faa2473e81f
parentdc816f8d925cac34922ea73abd94ae23a96cacac
fs: assert on ->i_count in iput_final()

Notably make sure the count is 0 after the return from ->drop_inode(),
provided we are going to drop.

Inspired by suspicious games played by f2fs.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/inode.c