Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367418
b: refs/heads/master
c: 9e45dd7
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Apr 11, 2013
1 parent 11d791a commit 7665cb8
Show file tree
Hide file tree
Showing 2 changed files with 14 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: 1fc2b00fba55f70ab32ecc493efbca9a1a76a4e3
refs/heads/master: 9e45dd73234af9a59613dc2989dcc2df2dab847f
18 changes: 13 additions & 5 deletions trunk/drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,17 +370,24 @@ static inline int iscsi_sw_tcp_xmit_qlen(struct iscsi_conn *conn)
static int iscsi_sw_tcp_pdu_xmit(struct iscsi_task *task)
{
struct iscsi_conn *conn = task->conn;
int rc;
unsigned long pflags = current->flags;
int rc = 0;

current->flags |= PF_MEMALLOC;

while (iscsi_sw_tcp_xmit_qlen(conn)) {
rc = iscsi_sw_tcp_xmit(conn);
if (rc == 0)
return -EAGAIN;
if (rc == 0) {
rc = -EAGAIN;
break;
}
if (rc < 0)
return rc;
break;
rc = 0;
}

return 0;
tsk_restore_flags(current, pflags, PF_MEMALLOC);
return rc;
}

/*
Expand Down Expand Up @@ -665,6 +672,7 @@ iscsi_sw_tcp_conn_bind(struct iscsi_cls_session *cls_session,
sk->sk_reuse = SK_CAN_REUSE;
sk->sk_sndtimeo = 15 * HZ; /* FIXME: make it configurable */
sk->sk_allocation = GFP_ATOMIC;
sk_set_memalloc(sk);

iscsi_sw_tcp_conn_set_callbacks(conn);
tcp_sw_conn->sendpage = tcp_sw_conn->sock->ops->sendpage;
Expand Down

0 comments on commit 7665cb8

Please sign in to comment.