summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2025-01-09 11:24:07 +0100
committerDavid Sterba <dsterba@suse.com>2025-01-13 14:53:22 +0100
commit2a1e8378dc3814e37deee2be495600da0c98b175 (patch)
tree1cd2289461fcb126f15a57ecdbf6e77cf0e7eebf /fs/btrfs/extent-tree.c
parentbtrfs: remove stray comment about SRCU (diff)
downloadlinux-2a1e8378dc3814e37deee2be495600da0c98b175.tar.xz
linux-2a1e8378dc3814e37deee2be495600da0c98b175.zip
btrfs: use SECTOR_SIZE defines in btrfs_issue_discard()
Use the existing define for single sector size. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 1cb1bd45f7ec..3014a1a23efd 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1256,12 +1256,12 @@ static int btrfs_issue_discard(struct block_device *bdev, u64 start, u64 len,
{
int j, ret = 0;
u64 bytes_left, end;
- u64 aligned_start = ALIGN(start, 1 << SECTOR_SHIFT);
+ u64 aligned_start = ALIGN(start, SECTOR_SIZE);
/* Adjust the range to be aligned to 512B sectors if necessary. */
if (start != aligned_start) {
len -= aligned_start - start;
- len = round_down(len, 1 << SECTOR_SHIFT);
+ len = round_down(len, SECTOR_SIZE);
start = aligned_start;
}