]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
dm: use ACCESS_ONCE for sysfs values
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 12 Oct 2012 15:59:46 +0000 (16:59 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 12 Oct 2012 15:59:46 +0000 (16:59 +0100)
commitfe5fe90639b62a75349dd1f1c74c4a984397171c
tree50332fca2fb4ff5851c4e1bfd8151d41ba83d781
parent54499afbb80e44ae5511984486b4b33d6229fceb
dm: use ACCESS_ONCE for sysfs values

Use the ACCESS_ONCE macro in dm-bufio and dm-verity where a variable
can be modified asynchronously (through sysfs) and we want to prevent
compiler optimizations that assume that the variable hasn't changed.
(See Documentation/atomic_ops.txt.)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-bufio.c
drivers/md/dm-verity.c