scst_vdisk, vdev_sysfs_process_get_filename(): Make sure that dev->dev_unregistering is reread from memory in each loop iteration. Note: the now removed "(volatile bool)" cast did not have any effect.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3894 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-10-10 08:27:27 +00:00
parent d9658fcda4
commit 16d26a8ba1
+2 -1
View File
@@ -4432,7 +4432,8 @@ static int vdev_sysfs_process_get_filename(struct scst_sysfs_work_item *work)
* under scst_vdisk_mutex.
*/
while (!mutex_trylock(&scst_vdisk_mutex)) {
if ((volatile bool)(dev->dev_unregistering)) {
smp_mb();
if (dev->dev_unregistering) {
TRACE_MGMT_DBG("Skipping being unregistered dev %s",
dev->virt_name);
res = -ENOENT;