Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330187
b: refs/heads/master
c: 1b86fda
h: refs/heads/master
i:
  330185: a7c766b
  330183: 2d9ff01
v: v3
  • Loading branch information
Ed Cashin authored and Linus Torvalds committed Oct 5, 2012
1 parent dcc1665 commit e95e8fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64a80f5ac78a289f66c373ace61973205d960ee7
refs/heads/master: 1b86fda9adf1b691a76f8ceddfc59d0c8386257c
4 changes: 4 additions & 0 deletions trunk/drivers/block/aoe/aoecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,15 @@ static void
ejectif(struct aoetgt *t, struct aoeif *ifp)
{
struct aoeif *e;
struct net_device *nd;
ulong n;

nd = ifp->nd;
e = t->ifs + NAOEIFS - 1;
n = (e - ifp) * sizeof *ifp;
memmove(ifp, ifp+1, n);
e->nd = NULL;
dev_put(nd);
}

static int
Expand Down Expand Up @@ -1317,6 +1320,7 @@ setifbcnt(struct aoetgt *t, struct net_device *nd, int bcnt)
pr_err("aoe: device setifbcnt failure; too many interfaces.\n");
return;
}
dev_hold(nd);
p->nd = nd;
p->bcnt = bcnt;
}
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/block/aoe/aoedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ freetgt(struct aoedev *d, struct aoetgt *t)
{
struct frame *f;
struct list_head *pos, *nx, *head;
struct aoeif *ifp;

for (ifp = t->ifs; ifp < &t->ifs[NAOEIFS]; ++ifp) {
if (!ifp->nd)
break;
dev_put(ifp->nd);
}

head = &t->ffree;
list_for_each_safe(pos, nx, head) {
Expand Down

0 comments on commit e95e8fc

Please sign in to comment.