Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144437
b: refs/heads/master
c: 048225e
h: refs/heads/master
i:
  144435: d48c787
v: v3
  • Loading branch information
Martin Petermann authored and James Bottomley committed Apr 27, 2009
1 parent 2023321 commit dd66e31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 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: d81ad31c6cf4e318e6b94c959bd9a56ca440b279
refs/heads/master: 048225e3f44f07c0f67e9665be0b4f18788de0eb
21 changes: 15 additions & 6 deletions trunk/drivers/s390/scsi/zfcp_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,21 @@ static ssize_t zfcp_sysfs_unit_remove_store(struct device *dev,

write_lock_irq(&zfcp_data.config_lock);
unit = zfcp_get_unit_by_lun(port, fcp_lun);
if (unit && (atomic_read(&unit->refcount) == 0)) {
zfcp_unit_get(unit);
atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &unit->status);
list_move(&unit->list, &unit_remove_lh);
} else
unit = NULL;
if (unit) {
write_unlock_irq(&zfcp_data.config_lock);
/* wait for possible timeout during SCSI probe */
flush_work(&unit->scsi_work);
write_lock_irq(&zfcp_data.config_lock);

if (atomic_read(&unit->refcount) == 0) {
zfcp_unit_get(unit);
atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE,
&unit->status);
list_move(&unit->list, &unit_remove_lh);
} else {
unit = NULL;
}
}

write_unlock_irq(&zfcp_data.config_lock);

Expand Down

0 comments on commit dd66e31

Please sign in to comment.