* [PATCH] block: initialize ret in bdev_disk_changed
@ 2021-04-08 19:41 Christoph Hellwig
2021-04-08 21:17 ` Chaitanya Kulkarni
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christoph Hellwig @ 2021-04-08 19:41 UTC (permalink / raw)
To: axboe; +Cc: linux-block, kernel test robot
Avoid a potentially initialized variabe in the invalidate case.
Fixes: d3c4a43d9291 ("block: refactor blk_drop_partitions")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/block_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 594a1bee9dd9ac..363015fcffdbba 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -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);
--
2.30.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] block: initialize ret in bdev_disk_changed
2021-04-08 19:41 [PATCH] block: initialize ret in bdev_disk_changed Christoph Hellwig
@ 2021-04-08 21:17 ` Chaitanya Kulkarni
2021-04-08 21:41 ` Keith Busch
2021-04-12 12:44 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-08 21:17 UTC (permalink / raw)
To: Christoph Hellwig, axboe; +Cc: linux-block, kernel test robot
On 4/8/21 12:44, Christoph Hellwig wrote:
> Avoid a potentially initialized variabe in the invalidate case.
>
> Fixes: d3c4a43d9291 ("block: refactor blk_drop_partitions")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] block: initialize ret in bdev_disk_changed
2021-04-08 19:41 [PATCH] block: initialize ret in bdev_disk_changed Christoph Hellwig
2021-04-08 21:17 ` Chaitanya Kulkarni
@ 2021-04-08 21:41 ` Keith Busch
2021-04-12 12:44 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2021-04-08 21:41 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, linux-block, kernel test robot
On Thu, Apr 08, 2021 at 09:41:40PM +0200, Christoph Hellwig wrote:
> Avoid a potentially initialized variabe in the invalidate case.
That should say "uninitialized variable", otherwise looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] block: initialize ret in bdev_disk_changed
2021-04-08 19:41 [PATCH] block: initialize ret in bdev_disk_changed Christoph Hellwig
2021-04-08 21:17 ` Chaitanya Kulkarni
2021-04-08 21:41 ` Keith Busch
@ 2021-04-12 12:44 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2021-04-12 12:44 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block, kernel test robot
On 4/8/21 1:41 PM, Christoph Hellwig wrote:
> Avoid a potentially initialized variabe in the invalidate case.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-12 12:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 19:41 [PATCH] block: initialize ret in bdev_disk_changed Christoph Hellwig
2021-04-08 21:17 ` Chaitanya Kulkarni
2021-04-08 21:41 ` Keith Busch
2021-04-12 12:44 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.