btrfs: fix typo in space info explanation
authorMark Harmstone <maharmstone@fb.com>
Tue, 18 Mar 2025 15:56:42 +0000 (15:56 +0000)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:39 +0000 (14:30 +0200)
There's an explanation of how space info works at the top of
fs/btrfs/space-info.c, which makes reference to a variable called
bytes_may_reserve.  There's nothing called that in the code, and wasn't
at time the comment was written; as far I can tell this is a typo, and
it should actually be bytes_may_use.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Mark Harmstone <maharmstone@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c

index ff089e3e410324139e85434e6fd95cc3430b6bd1..77cc5d4a5a4774a412bdf55b5e322e9232c5366c 100644 (file)
  *   num_bytes we want to reserve.
  *
  *   ->reserve
- *     space_info->bytes_may_reserve += num_bytes
+ *     space_info->bytes_may_use += num_bytes
  *
  *   ->extent allocation
  *     Call btrfs_add_reserved_bytes() which does
- *     space_info->bytes_may_reserve -= num_bytes
+ *     space_info->bytes_may_use -= num_bytes
  *     space_info->bytes_reserved += extent_bytes
  *
  *   ->insert reference