Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299950
b: refs/heads/master
c: cde2e9a
h: refs/heads/master
v: v3
  • Loading branch information
Neil Horman authored and David S. Miller committed Apr 28, 2012
1 parent 10dca65 commit 8765cf1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 651913ce9de2bbcedef608c5d6cf39c244248509
refs/heads/master: cde2e9a651b76d8db36ae94cd0febc82b637e5dd
14 changes: 7 additions & 7 deletions trunk/net/core/drop_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static void send_dm_alert(struct work_struct *unused);
* netlink alerts
*/
static int trace_state = TRACE_OFF;
static DEFINE_SPINLOCK(trace_state_lock);
static DEFINE_MUTEX(trace_state_mutex);

struct per_cpu_dm_data {
struct work_struct dm_alert_work;
Expand Down Expand Up @@ -214,7 +214,7 @@ static int set_all_monitor_traces(int state)
struct dm_hw_stat_delta *new_stat = NULL;
struct dm_hw_stat_delta *temp;

spin_lock(&trace_state_lock);
mutex_lock(&trace_state_mutex);

if (state == trace_state) {
rc = -EAGAIN;
Expand Down Expand Up @@ -253,7 +253,7 @@ static int set_all_monitor_traces(int state)
rc = -EINPROGRESS;

out_unlock:
spin_unlock(&trace_state_lock);
mutex_unlock(&trace_state_mutex);

return rc;
}
Expand Down Expand Up @@ -296,12 +296,12 @@ static int dropmon_net_event(struct notifier_block *ev_block,

new_stat->dev = dev;
new_stat->last_rx = jiffies;
spin_lock(&trace_state_lock);
mutex_lock(&trace_state_mutex);
list_add_rcu(&new_stat->list, &hw_stats_list);
spin_unlock(&trace_state_lock);
mutex_unlock(&trace_state_mutex);
break;
case NETDEV_UNREGISTER:
spin_lock(&trace_state_lock);
mutex_lock(&trace_state_mutex);
list_for_each_entry_safe(new_stat, tmp, &hw_stats_list, list) {
if (new_stat->dev == dev) {
new_stat->dev = NULL;
Expand All @@ -312,7 +312,7 @@ static int dropmon_net_event(struct notifier_block *ev_block,
}
}
}
spin_unlock(&trace_state_lock);
mutex_unlock(&trace_state_mutex);
break;
}
out:
Expand Down

0 comments on commit 8765cf1

Please sign in to comment.