mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] md: remove unused dm_thin_remove_block()
@ 2022-02-16  6:37 Zhiqiang Liu
  2022-03-14 13:23 ` Zhiqiang Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Zhiqiang Liu @ 2022-02-16  6:37 UTC (permalink / raw)
  To: agk, Mike Snitzer
  Cc: dm-devel, linux-kernel, linfeilong, lixiaokeng, wuguanghao


dm_thin_remove_block() is no longer unused, just remove it.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
---
 drivers/md/dm-thin-metadata.c | 12 ------------
 drivers/md/dm-thin-metadata.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index 1a96a07cbf44..986a2dc9a686 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -1740,18 +1740,6 @@ static int __remove_range(struct dm_thin_device *td, dm_block_t begin, dm_block_
 	return dm_btree_insert(&pmd->tl_info, pmd->root, keys, &value, &pmd->root);
 }

-int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block)
-{
-	int r = -EINVAL;
-
-	pmd_write_lock(td->pmd);
-	if (!td->pmd->fail_io)
-		r = __remove(td, block);
-	pmd_write_unlock(td->pmd);
-
-	return r;
-}
-
 int dm_thin_remove_range(struct dm_thin_device *td,
 			 dm_block_t begin, dm_block_t end)
 {
diff --git a/drivers/md/dm-thin-metadata.h b/drivers/md/dm-thin-metadata.h
index 7ef56bd2a7e3..4d7a2caf21d9 100644
--- a/drivers/md/dm-thin-metadata.h
+++ b/drivers/md/dm-thin-metadata.h
@@ -166,7 +166,6 @@ int dm_pool_alloc_data_block(struct dm_pool_metadata *pmd, dm_block_t *result);
 int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block,
 			 dm_block_t data_block);

-int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block);
 int dm_thin_remove_range(struct dm_thin_device *td,
 			 dm_block_t begin, dm_block_t end);

-- 
2.32.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] md: remove unused dm_thin_remove_block()
  2022-02-16  6:37 [PATCH] md: remove unused dm_thin_remove_block() Zhiqiang Liu
@ 2022-03-14 13:23 ` Zhiqiang Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Zhiqiang Liu @ 2022-03-14 13:23 UTC (permalink / raw)
  To: agk, Mike Snitzer
  Cc: dm-devel, linux-kernel, linfeilong, lixiaokeng, wuguanghao,
	liuzhiqiang26

friendly ping..

On 2022/2/16 14:37, Zhiqiang Liu wrote:
> dm_thin_remove_block() is no longer unused, just remove it.
>
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> ---
>  drivers/md/dm-thin-metadata.c | 12 ------------
>  drivers/md/dm-thin-metadata.h |  1 -
>  2 files changed, 13 deletions(-)
>
> diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
> index 1a96a07cbf44..986a2dc9a686 100644
> --- a/drivers/md/dm-thin-metadata.c
> +++ b/drivers/md/dm-thin-metadata.c
> @@ -1740,18 +1740,6 @@ static int __remove_range(struct dm_thin_device *td, dm_block_t begin, dm_block_
>  	return dm_btree_insert(&pmd->tl_info, pmd->root, keys, &value, &pmd->root);
>  }
>
> -int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block)
> -{
> -	int r = -EINVAL;
> -
> -	pmd_write_lock(td->pmd);
> -	if (!td->pmd->fail_io)
> -		r = __remove(td, block);
> -	pmd_write_unlock(td->pmd);
> -
> -	return r;
> -}
> -
>  int dm_thin_remove_range(struct dm_thin_device *td,
>  			 dm_block_t begin, dm_block_t end)
>  {
> diff --git a/drivers/md/dm-thin-metadata.h b/drivers/md/dm-thin-metadata.h
> index 7ef56bd2a7e3..4d7a2caf21d9 100644
> --- a/drivers/md/dm-thin-metadata.h
> +++ b/drivers/md/dm-thin-metadata.h
> @@ -166,7 +166,6 @@ int dm_pool_alloc_data_block(struct dm_pool_metadata *pmd, dm_block_t *result);
>  int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block,
>  			 dm_block_t data_block);
>
> -int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block);
>  int dm_thin_remove_range(struct dm_thin_device *td,
>  			 dm_block_t begin, dm_block_t end);
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-14 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16  6:37 [PATCH] md: remove unused dm_thin_remove_block() Zhiqiang Liu
2022-03-14 13:23 ` Zhiqiang Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®