]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix logging on capacity change
authorMing Lei <ming.lei@redhat.com>
Tue, 23 Feb 2021 08:50:15 +0000 (16:50 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Feb 2021 02:28:51 +0000 (19:28 -0700)
commit21b78dd93c3e65d1a94d3aaa70e57b6f87690c57
tree12f491255956830d0da74318f97fe6b0ebc1a5e0
parent51570818556db94ef59f29b439aaac15a2adf68e
block: fix logging on capacity change

Local variable of 'capacity' stores the previous disk capacity, and
'size' variable records the latest disk capacity, so swap them for
fixing logging on capacity change.

Cc: Christoph Hellwig <hch@lst.de>
Fixes: f2b9d7cbef4c ("block: remove the nr_sects field in struct hd_struct")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c