nvdimm: virtio_pmem: use READ_ONCE()/WRITE_ONCE() for wait flags

Use READ_ONCE()/WRITE_ONCE() for the wait_event() flags (done and
wq_buf_avail). They are observed by waiters without pmem_lock, so make
the accesses explicit single loads/stores and avoid compiler
reordering/caching across the wait/wake paths.

Acked-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Signed-off-by: Li Chen <me@linux.beauty>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260630092338.2094628-8-me@linux.beauty>
This commit is contained in:
Li Chen 2026-06-30 17:23:32 +08:00 • committed by Michael S. Tsirkin
commit 08e72a5ba1