diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/netprio_cgroup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index 5b8aa2fae48b..aa907ed466ea 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c | |||
@@ -49,8 +49,9 @@ static int get_prioidx(u32 *prio) | |||
49 | return -ENOSPC; | 49 | return -ENOSPC; |
50 | } | 50 | } |
51 | set_bit(prioidx, prioidx_map); | 51 | set_bit(prioidx, prioidx_map); |
52 | if (atomic_read(&max_prioidx) < prioidx) | ||
53 | atomic_set(&max_prioidx, prioidx); | ||
52 | spin_unlock_irqrestore(&prioidx_map_lock, flags); | 54 | spin_unlock_irqrestore(&prioidx_map_lock, flags); |
53 | atomic_set(&max_prioidx, prioidx); | ||
54 | *prio = prioidx; | 55 | *prio = prioidx; |
55 | return 0; | 56 | return 0; |
56 | } | 57 | } |