mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
83794367dc
The code for setting a block device capacity (bd_nr_sectors field of struct block_device) is duplicated in set_capacity() and bdev_set_nr_sectors(). Clean this up by making bdev_set_nr_sectors() a block layer internal function defined in block/bdev.c instead of having this function statically defined in block/partitions/core.c. With this change, set_capacity() implementation can be simplified to only calling bdev_set_nr_sectors(). Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20230424131318.79935-1-dlemoal@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> |
||
---|---|---|
.. | ||
acorn.c | ||
aix.c | ||
amiga.c | ||
atari.c | ||
atari.h | ||
check.h | ||
cmdline.c | ||
core.c | ||
efi.c | ||
efi.h | ||
ibm.c | ||
karma.c | ||
Kconfig | ||
ldm.c | ||
ldm.h | ||
mac.c | ||
mac.h | ||
Makefile | ||
msdos.c | ||
osf.c | ||
sgi.c | ||
sun.c | ||
sysv68.c | ||
ultrix.c |