From b50fff816cbd670ea545ce98ae374356f08f2d75 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 8 Nov 2017 01:39:58 +0100 Subject: 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 --- fs/btrfs/transaction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/btrfs/transaction.h') diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index c48a4a03f1b4..afa88f035654 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -111,7 +111,7 @@ struct btrfs_trans_handle { u64 transid; u64 bytes_reserved; u64 chunk_bytes_reserved; - unsigned long use_count; + refcount_t use_count; unsigned long delayed_ref_updates; struct btrfs_transaction *transaction; struct btrfs_block_rsv *block_rsv; -- cgit v1.2.3