]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: scsi_debug: Stop using READ/WRITE_ONCE() when accessing sdebug_defer.defer_t
authorJohn Garry <john.g.garry@oracle.com>
Thu, 13 Nov 2025 13:36:41 +0000 (13:36 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 Dec 2025 02:48:22 +0000 (21:48 -0500)
commit559ae7a26b105f9e0b1279b3ab8029623592e900
tree56882c2f55c286d69d0ab3a4673c6dc1c8827283
parenta743b120227a371f37c46738d91cc7a9691dbcf6
scsi: scsi_debug: Stop using READ/WRITE_ONCE() when accessing sdebug_defer.defer_t

Using READ/WRITE_ONCE() means that the read or write is not torn by the
compiler.

READ/WRITE_ONCE() is always used when accessing sdebug_defer.defer_t.

However, we also guard the access in a spinlock when accessing that
member, and spinlock already guarantees no tearing, so stop using
READ/WRITE_ONCE().

Signed-off-by: John Garry <john.g.garry@oracle.com>
Link: https://patch.msgid.link/20251113133645.2898748-3-john.g.garry@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c