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:08:49 +0000 (11:08 -0800)
commitfceb0d85246e9378dacc70deaee7e5c304558728
tree1b98a82b8d315fe79b722856a68f7801d2caeefd
parentb42128078cfc1c84a53547d31126fdb2e188b9cb
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