Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fw-sbp2: fix refcounting
  • Loading branch information
Linus Torvalds committed Nov 9, 2007
2 parents 98d74e0 + 7c45d19 commit eae1920
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/firewire/fw-sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,13 +650,14 @@ static void sbp2_login(struct work_struct *work)
if (sbp2_send_management_orb(lu, node_id, generation,
SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) {
if (lu->retries++ < 5) {
queue_delayed_work(sbp2_wq, &lu->work,
DIV_ROUND_UP(HZ, 5));
if (queue_delayed_work(sbp2_wq, &lu->work,
DIV_ROUND_UP(HZ, 5)))
kref_get(&lu->tgt->kref);
} else {
fw_error("failed to login to %s LUN %04x\n",
unit->device.bus_id, lu->lun);
kref_put(&lu->tgt->kref, sbp2_release_target);
}
kref_put(&lu->tgt->kref, sbp2_release_target);
return;
}

Expand Down Expand Up @@ -914,7 +915,9 @@ static void sbp2_reconnect(struct work_struct *work)
lu->retries = 0;
PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
}
queue_delayed_work(sbp2_wq, &lu->work, DIV_ROUND_UP(HZ, 5));
if (queue_delayed_work(sbp2_wq, &lu->work, DIV_ROUND_UP(HZ, 5)))
kref_get(&lu->tgt->kref);
kref_put(&lu->tgt->kref, sbp2_release_target);
return;
}

Expand Down

0 comments on commit eae1920

Please sign in to comment.