[PATCH 0/2] mtd: switch to keying by dev_t

Christian Brauner brauner at kernel.org
Tue Aug 29 08:23:55 PDT 2023


Hey,

For this cycle Jan, Christoph, and myself switched the generic super
code to key superblocks for block devices by device number (sb->s_dev)
instead of block device pointers (sb->s_bdev).

Not just does this allow us to defer opening block devices after we
allocated a superblock it also allows us to move closing block devices
to a later point to avoid various deadlocks.

Similar to the generic code for block devices we need to switch mtd
devices to rely on sb->s_dev instead of sb->s_mtd to avoid potential
use-after-free issues.

I plan on taking this upstream as a fix during the merge window.

Thanks!
Christian

---



---
base-commit: dc3216b1416056b04712e53431f6e9aefdc83177
change-id: 20230829-vfs-super-mtd-1bb602abfc00




More information about the linux-mtd mailing list