]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: switch to refcount_t type for btrfs_trans_handle::use_count
authorDavid Sterba <dsterba@suse.com>
Wed, 8 Nov 2017 00:39:58 +0000 (01:39 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:14 +0000 (16:08 +0100)
commit33c2a3e21fb4f6eb4f53323d2d24c732b39cb984
tree583500f65c4a3b0db13963d7bec475c70dc8467c
parent448ac63ad7d243fa75ee1e1c82cea06844cce787
btrfs: switch to refcount_t type for btrfs_trans_handle::use_count

The use_count is a reference counter, we can use the refcount_t type,
though we don't use the atomicity. This is not a performance critical
code and we could catch the underflows. The type is changed from long,
but the number of references will fit an int.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/transaction.c
fs/btrfs/transaction.h