block/bdev.c: use the knowledge of inode/bdev coallocation
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 28 Apr 2024 23:09:12 +0000 (19:09 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 3 May 2024 06:36:55 +0000 (02:36 -0400)
commitdf65f1660b6141f0b051d2439cc99222a6ae865b
treed0abc91b66a58a65cff73f60d7ac89845caf1796
parent2d0026a4901be98000137af41bb42b6ead5a4c27
block/bdev.c: use the knowledge of inode/bdev coallocation

Here we know that bdevfs inodes are coallocated with struct block_device
and we can get to ->bd_inode value without any dereferencing.  Introduce
an inlined helper (static, *not* exported, purely internal for bdev.c)
that gets an associated inode by block_device - BD_INODE(bdev).

NOTE: leave it static; nobody outside of block/bdev.c has any business
playing with that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
block/bdev.c