Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-block
[sfrench/cifs-2.6.git] / drivers / s390 / char / tape_block.c
index 559d51490e2fe8526fca657421b36637fdfaf447..5ced2725d6c705fda1529cafece44847d83df96b 100644 (file)
@@ -65,7 +65,7 @@ static void
 tapeblock_trigger_requeue(struct tape_device *device)
 {
        /* Protect against rescheduling. */
-       if (atomic_compare_and_swap(0, 1, &device->blk_data.requeue_scheduled))
+       if (atomic_cmpxchg(&device->blk_data.requeue_scheduled, 0, 1) != 0)
                return;
        schedule_work(&device->blk_data.requeue_task);
 }