Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77075
b: refs/heads/master
c: df93ffc
h: refs/heads/master
i:
  77073: c0a0d6c
  77071: ec7d322
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Jan 12, 2008
1 parent 69f8a9c commit 249a163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 118365721768f29d74718a59895ed7bd3c10b68e
refs/heads/master: df93ffcd748ce41e7b716c3056ae511939bb745e
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1774,12 +1774,12 @@ iscsi_conn_set_param(struct iscsi_cls_conn *cls_conn, enum iscsi_param param,
break;
case ISCSI_PARAM_MAX_R2T:
sscanf(buf, "%d", &value);
if (session->max_r2t == roundup_pow_of_two(value))
if (value <= 0 || !is_power_of_2(value))
return -EINVAL;
if (session->max_r2t == value)
break;
iscsi_r2tpool_free(session);
iscsi_set_param(cls_conn, param, buf, buflen);
if (session->max_r2t & (session->max_r2t - 1))
session->max_r2t = roundup_pow_of_two(session->max_r2t);
if (iscsi_r2tpool_alloc(session))
return -ENOMEM;
break;
Expand Down

0 comments on commit 249a163

Please sign in to comment.