diff options
author | Damien Le Moal <[email protected]> | 2023-04-24 22:13:18 +0900 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2023-04-24 08:48:09 -0600 |
commit | 83794367dcc6749662b17a1e4b8ec085023fc53b (patch) | |
tree | 25f3a27d3d30de07114aeb88ac0f8fcb29b12393 /scripts/generate_rust_analyzer.py | |
parent | 55793ea54d77719a071b1ccc05a05056e3b5e009 (diff) |
block: Cleanup set_capacity()/bdev_set_nr_sectors()
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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions