dm zoned: fix metadata block ref counting
authorDamien Le Moal <damien.lemoal@wdc.com>
Wed, 17 Oct 2018 09:05:07 +0000 (18:05 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:15:10 +0000 (11:15 -0800)
commit229cbc6123b4b1d2d46956a869e6dbf6905265a4
tree4e25621afdcb767c014724db7ed4fadbab4f22b3
parenta0a4629065e4cc4a79b91d9942afb5565d86b462
dm zoned: fix metadata block ref counting

commit 33c2865f8d011a2ca9f67124ddab9dc89382e9f1 upstream.

Since the ref field of struct dmz_mblock is always used with the
spinlock of struct dmz_metadata locked, there is no need to use an
atomic_t type. Change the type of the ref field to an unsigne
integer.

Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-zoned-metadata.c