diff options
author | Anand Jain <anand.jain@oracle.com> | 2023-04-15 17:51:23 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-06-19 13:59:23 +0200 |
commit | 29e70be261d92829af26fda16769784710f45503 (patch) | |
tree | 2fc9eccf7c573d2eabf3a931219718fe55999ed8 /fs/btrfs/inode.c | |
parent | eee3b811784e52f06ccb3e1c4518a9907627d4fe (diff) |
btrfs: use SECTOR_SHIFT to convert physical offset to LBA
Use SECTOR_SHIFT while converting a physical address to an LBA, makes
it more readable.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7fcafcc5292c..e6a21bbf40f2 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8639,7 +8639,7 @@ static int btrfs_getattr(struct mnt_idmap *idmap, inode_bytes = inode_get_bytes(inode); spin_unlock(&BTRFS_I(inode)->lock); stat->blocks = (ALIGN(inode_bytes, blocksize) + - ALIGN(delalloc_bytes, blocksize)) >> 9; + ALIGN(delalloc_bytes, blocksize)) >> SECTOR_SHIFT; return 0; } |