diff mbox series

[6/7] xfs: Convert to bdev_logical_block_mask()

Message ID 20230628093500.68779-6-frank.li@vivo.com (mailing list archive)
State New, archived
Headers show
Series [1/7] block: add queue_logical_block_mask() and bdev_logical_block_mask() | expand

Commit Message

Yangtao Li June 28, 2023, 9:34 a.m. UTC
Use bdev_logical_block_mask() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/xfs/xfs_buf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bill O'Donnell June 28, 2023, 4:41 p.m. UTC | #1
On Wed, Jun 28, 2023 at 05:34:59PM +0800, Yangtao Li wrote:
> Use bdev_logical_block_mask() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>

> ---
>  fs/xfs/xfs_buf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 15d1e5a7c2d3..f784daa21219 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -1968,7 +1968,7 @@ xfs_setsize_buftarg(
>  
>  	/* Set up device logical sector size mask */
>  	btp->bt_logical_sectorsize = bdev_logical_block_size(btp->bt_bdev);
> -	btp->bt_logical_sectormask = bdev_logical_block_size(btp->bt_bdev) - 1;
> +	btp->bt_logical_sectormask = bdev_logical_block_mask(btp->bt_bdev);
>  
>  	return 0;
>  }
> -- 
> 2.39.0
>
diff mbox series

Patch

diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 15d1e5a7c2d3..f784daa21219 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1968,7 +1968,7 @@  xfs_setsize_buftarg(
 
 	/* Set up device logical sector size mask */
 	btp->bt_logical_sectorsize = bdev_logical_block_size(btp->bt_bdev);
-	btp->bt_logical_sectormask = bdev_logical_block_size(btp->bt_bdev) - 1;
+	btp->bt_logical_sectormask = bdev_logical_block_mask(btp->bt_bdev);
 
 	return 0;
 }