Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35026
b: refs/heads/master
c: e648f63
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Sep 2, 2006
1 parent e25744d commit ae69dc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: f47f2cf5d4acf929a3aaa6957c3fc4622c358703
refs/heads/master: e648f63c6520d6e572573149c16a64d2c5ad7ec5
9 changes: 4 additions & 5 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,8 @@ static void iscsi_get_ctask(struct iscsi_cmd_task *ctask)

static void __iscsi_put_ctask(struct iscsi_cmd_task *ctask)
{
struct iscsi_conn *conn = ctask->conn;

if (atomic_dec_and_test(&ctask->refcount)) {
conn->session->tt->cleanup_cmd_task(conn, ctask);
if (atomic_dec_and_test(&ctask->refcount))
iscsi_complete_command(ctask);
}
}

static void iscsi_put_ctask(struct iscsi_cmd_task *ctask)
Expand Down Expand Up @@ -1129,10 +1125,13 @@ static void fail_command(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask,
sc = ctask->sc;
if (!sc)
return;

conn->session->tt->cleanup_cmd_task(conn, ctask);
iscsi_ctask_mtask_cleanup(ctask);

sc->result = err;
sc->resid = sc->request_bufflen;
/* release ref from queuecommand */
__iscsi_put_ctask(ctask);
}

Expand Down

0 comments on commit ae69dc6

Please sign in to comment.