diff mbox series

[15/19] md: use bdev_check_media_change

Message ID 20200908145347.2992670-16-hch@lst.de
State Not Applicable
Delegated to: David Miller
Headers show
Series [01/19] block: add a bdev_check_media_change helper | expand

Commit Message

Christoph Hellwig Sept. 8, 2020, 2:53 p.m. UTC
The md driver does not have a ->revalidate_disk method, so it can just
use bdev_check_media_change without any additional changes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 drivers/md/md.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Song Liu Sept. 9, 2020, 12:49 a.m. UTC | #1
On Tue, Sep 8, 2020 at 7:55 AM Christoph Hellwig <hch@lst.de> wrote:
>
> The md driver does not have a ->revalidate_disk method, so it can just
> use bdev_check_media_change without any additional changes.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

Acked-by: Song Liu <song@kernel.org>

> ---
>  drivers/md/md.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 9562ef598ae1f4..27ed61197014ef 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -7848,7 +7848,7 @@ static int md_open(struct block_device *bdev, fmode_t mode)
>         atomic_inc(&mddev->openers);
>         mutex_unlock(&mddev->open_mutex);
>
> -       check_disk_change(bdev);
> +       bdev_check_media_change(bdev);
>   out:
>         if (err)
>                 mddev_put(mddev);
> --
> 2.28.0
>
Hannes Reinecke Sept. 9, 2020, 7:34 a.m. UTC | #2
On 9/8/20 4:53 PM, Christoph Hellwig wrote:
> The md driver does not have a ->revalidate_disk method, so it can just
> use bdev_check_media_change without any additional changes.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>  drivers/md/md.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 9562ef598ae1f4..27ed61197014ef 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -7848,7 +7848,7 @@ static int md_open(struct block_device *bdev, fmode_t mode)
>  	atomic_inc(&mddev->openers);
>  	mutex_unlock(&mddev->open_mutex);
>  
> -	check_disk_change(bdev);
> +	bdev_check_media_change(bdev);
>   out:
>  	if (err)
>  		mddev_put(mddev);
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9562ef598ae1f4..27ed61197014ef 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7848,7 +7848,7 @@  static int md_open(struct block_device *bdev, fmode_t mode)
 	atomic_inc(&mddev->openers);
 	mutex_unlock(&mddev->open_mutex);
 
-	check_disk_change(bdev);
+	bdev_check_media_change(bdev);
  out:
 	if (err)
 		mddev_put(mddev);