public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] block: unexport truncate_bdev_range
Date: Mon, 25 Jan 2021 09:20:42 +0100	[thread overview]
Message-ID: <20210125082042.GA11659@lst.de> (raw)
In-Reply-To: <20210109111332.1132424-1-hch@lst.de>

Jens,

can you pick this one up?

On Sat, Jan 09, 2021 at 12:13:32PM +0100, Christoph Hellwig wrote:
> truncate_bdev_range is only used in always built-in block layer code,
> so remove the export and the !CONFIG_BLOCK stub.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/block_dev.c         | 1 -
>  include/linux/blkdev.h | 9 ++-------
>  2 files changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 3e5b02f6606c42..41a9b0cb2d8a16 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -126,7 +126,6 @@ int truncate_bdev_range(struct block_device *bdev, fmode_t mode,
>  		bd_abort_claiming(bdev, truncate_bdev_range);
>  	return 0;
>  }
> -EXPORT_SYMBOL(truncate_bdev_range);
>  
>  static void set_init_blocksize(struct block_device *bdev)
>  {
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index f94ee3089e015e..22fc4f3141d555 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -2012,21 +2012,16 @@ void bdev_add(struct block_device *bdev, dev_t dev);
>  struct block_device *I_BDEV(struct inode *inode);
>  struct block_device *bdgrab(struct block_device *bdev);
>  void bdput(struct block_device *);
> +int truncate_bdev_range(struct block_device *bdev, fmode_t mode, loff_t lstart,
> +		loff_t lend);
>  
>  #ifdef CONFIG_BLOCK
>  void invalidate_bdev(struct block_device *bdev);
> -int truncate_bdev_range(struct block_device *bdev, fmode_t mode, loff_t lstart,
> -			loff_t lend);
>  int sync_blockdev(struct block_device *bdev);
>  #else
>  static inline void invalidate_bdev(struct block_device *bdev)
>  {
>  }
> -static inline int truncate_bdev_range(struct block_device *bdev, fmode_t mode,
> -				      loff_t lstart, loff_t lend)
> -{
> -	return 0;
> -}
>  static inline int sync_blockdev(struct block_device *bdev)
>  {
>  	return 0;
> -- 
> 2.29.2
---end quoted text---

  reply	other threads:[~2021-01-26 19:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09 11:13 [PATCH] block: unexport truncate_bdev_range Christoph Hellwig
2021-01-25  8:20 ` Christoph Hellwig [this message]
2021-01-26 20:14 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210125082042.GA11659@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox