dm integrity: change 'suspending' variable from bool to int
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 3 Jul 2018 18:13:25 +0000 (20:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Sep 2018 17:55:55 +0000 (19:55 +0200)
commit4f4b1c5c4c8a566ba5debc9e1a613de5e540c9ae
tree1c27b6e996edac0040ff4ad8a222ab5ba58665d2
parent5f04d296f24b8a89c48eba775260d772834f9a6c
dm integrity: change 'suspending' variable from bool to int

commit c21b16392701543d61e366dca84e15fe7f0cf0cf upstream.

Early alpha processors can't write a byte or short atomically - they
read 8 bytes, modify the byte or two bytes in registers and write back
8 bytes.

The modification of the variable "suspending" may race with
modification of the variable "failed".  Fix this by changing
"suspending" to an int.

Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-integrity.c