]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Convert fs_info->free_chunk_space to atomic64_t
authorNikolay Borisov <nborisov@suse.com>
Thu, 11 May 2017 06:17:46 +0000 (09:17 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:25:58 +0000 (18:25 +0200)
commitd33dce5faebf4bc544923cba0467913663edd512
tree0fe59f8adb887bfab495948f2d7278c16daea491
parent93b60f24d873da4ecce9ef94e1492d521842a1ba
btrfs: Convert fs_info->free_chunk_space to atomic64_t

The ->free_chunk_space variable is used to track the unallocated space
and access to it is protected by a spinlock, which is not used for
anything else.  Make the code a bit self-explanatory by switching the
variable to an atomic64_t type and kill the spinlock.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
[ not a performance critical code, use of atomic type is ok ]
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/volumes.c