block: initialize ret in bdev_disk_changed
Subsystems (2)
PATCH 1/1 block: initialize ret in bdev_disk_changed
Avoid a potentially initialized variabe in the invalidate case.
Fixes d3c4a43d9291 ("block: refactor blk_drop_partitions")
Reported-by kernel test robot <[email protected]>
Signed-off-by Christoph Hellwig <[email protected]>
--- fs/block_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/block_dev.c +1 -1
@@ -1236,7 +1236,7 @@ static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part);int bdev_disk_changed (struct block_device *bdev,bool invalidate) {struct gendisk *disk = bdev->bd_disk; -int ret; +int ret =0 ;lockdep_assert_held (&bdev->bd_mutex);
Signature · 1 line
2.30.1
Quoted 6 lines · Christoph Hellwig
Avoid a potentially initialized variabe in the invalidate case.
Fixes d3c4a43d9291 ("block: refactor blk_drop_partitions")Reported-by kernel test robot <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>---
Looks good.
Reviewed-by Chaitanya Kulkarni <[email protected]>
Quoted 1 line · Christoph Hellwig
Avoid a potentially initialized variabe in the invalidate case.
That should say "uninitialized variable", otherwise looks good.
Reviewed-by Keith Busch <[email protected]>
Quoted 1 line · Christoph Hellwig
Avoid a potentially initialized variabe in the invalidate case.
Applied, thanks.
Signature · 1 line
Jens Axboe