On Tue, Nov 18, 2025 at 07:21:51AM +0100, Christoph Hellwig wrote:
> All the callers now want a byte offset into the inode, so return
> that from bh_get_inode_and_lblk_num.
> 
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---
>  fs/crypto/inline_crypt.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/crypto/inline_crypt.c b/fs/crypto/inline_crypt.c
> index c069958c4819..128268adf960 100644
> --- a/fs/crypto/inline_crypt.c
> +++ b/fs/crypto/inline_crypt.c
> @@ -315,7 +315,7 @@ EXPORT_SYMBOL_GPL(fscrypt_set_bio_crypt_ctx);
>  /* Extract the inode and logical block number from a buffer_head. */

inode and file position

>  static bool bh_get_inode_and_lblk_num(const struct buffer_head *bh,
>                                     const struct inode **inode_ret,
> -                                   u64 *lblk_num_ret)
> +                                   loff_t *pos_ret)

Rename to bh_get_inode_and_pos()

> * Same as fscrypt_set_bio_crypt_ctx(), except this takes a buffer_head 
> instead  
> * of an inode and block number directly.                                      
>   
> */                                                                            
>   
> void fscrypt_set_bio_crypt_ctx_bh(struct bio *bio,                            
>    
>                                  const struct buffer_head *first_bh,          
>   
>                                  gfp_t gfp_mask)                

inode and file position

> * Same as fscrypt_mergeable_bio(), except this takes a buffer_head instead of
> * an inode and block number directly.
> *
> * Return: true iff the I/O is mergeable
> */
> bool fscrypt_mergeable_bio_bh(struct bio *bio,
>                              const struct buffer_head *next_bh)

inode and file position

- Eric

Reply via email to