Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139305
b: refs/heads/master
c: b5cd99e
h: refs/heads/master
i:
  139303: 6395194
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Mar 31, 2009
1 parent 26262e8 commit dfb2ff0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47593bfa1056d306fde067b28dd8617009be4121
refs/heads/master: b5cd99e6b002776c0e946f38292adbb0258b7983
6 changes: 5 additions & 1 deletion trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,11 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
int force, ret;
unsigned long i;

if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0)
if ((cdev->private->state != DEV_STATE_OFFLINE &&
cdev->private->state != DEV_STATE_ONLINE &&
cdev->private->state != DEV_STATE_BOXED &&
cdev->private->state != DEV_STATE_DISCONNECTED) ||
atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0)
return -EAGAIN;

if (cdev->drv && !try_module_get(cdev->drv->owner)) {
Expand Down

0 comments on commit dfb2ff0

Please sign in to comment.