Re: [PATCH] md: use mddev->external to select holder in export_rdev()
From: Christoph Hellwig <hch@lst.de>
Date: 2023-06-19 05:00:21
Also in:
linux-block
From: Christoph Hellwig <hch@lst.de>
Date: 2023-06-19 05:00:21
Also in:
linux-block
On Fri, Jun 16, 2023 at 10:24:04PM -0700, Song Liu wrote:
This means export_rdev() calls blkdev_put with a different holder than the one used by blkdev_get_by_dev(). This is because mddev->major_version == -2 is not a good check for external metadata. Fix this by using mddev->external instead. Also, do not clear mddev->external in md_clean(), as the flag might be used later in export_rdev().
Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>