Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287505
b: refs/heads/master
c: 5962b35
h: refs/heads/master
i:
  287503: 97b9307
v: v3
  • Loading branch information
Neil Horman authored and David S. Miller committed Feb 4, 2012
1 parent 98d81f2 commit c2da7aa
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 1715322f3e0600b664fa8b780a07de104f49c104
refs/heads/master: 5962b35c1de3254a2f03b95efd3b7854b874d7b7
7 changes: 4 additions & 3 deletions trunk/net/core/netprio_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ static int get_prioidx(u32 *prio)

spin_lock_irqsave(&prioidx_map_lock, flags);
prioidx = find_first_zero_bit(prioidx_map, sizeof(unsigned long) * PRIOIDX_SZ);
if (prioidx == sizeof(unsigned long) * PRIOIDX_SZ) {
spin_unlock_irqrestore(&prioidx_map_lock, flags);
return -ENOSPC;
}
set_bit(prioidx, prioidx_map);
spin_unlock_irqrestore(&prioidx_map_lock, flags);
if (prioidx == sizeof(unsigned long) * PRIOIDX_SZ)
return -ENOSPC;

atomic_set(&max_prioidx, prioidx);
*prio = prioidx;
return 0;
Expand Down

0 comments on commit c2da7aa

Please sign in to comment.