Re: [PATCH] block: unexport truncate_bdev_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> ---
>  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---



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux