diff mbox series

[03/18] btrfs: use SECTOR_SIZE defines in btrfs_issue_discard()

Message ID 65d2dc893f64333160c5726d63304cc063c2b0b0.1736418116.git.dsterba@suse.com (mailing list archive)
State New
Headers show
Series Random cleanups for 6.14 | expand

Commit Message

David Sterba Jan. 9, 2025, 10:24 a.m. UTC
Use the existing define for single sector size.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/extent-tree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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;
 	}