diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-05-08 21:45:15 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-25 00:02:15 +0200 |
commit | 5fe231e873729fa2f57cdc417d5c1f80871e2d7d (patch) | |
tree | 48810991fa4cf4faa69c0a992fdaf962feb6edda /net/wireless/debugfs.c | |
parent | 73810b77def898b43a97638478692922b7f820eb (diff) | |
download | linux-5fe231e873729fa2f57cdc417d5c1f80871e2d7d.tar.gz linux-5fe231e873729fa2f57cdc417d5c1f80871e2d7d.tar.bz2 linux-5fe231e873729fa2f57cdc417d5c1f80871e2d7d.zip |
cfg80211: vastly simplify locking
Virtually all code paths in cfg80211 already (need to) hold
the RTNL. As such, there's little point in having another
four mutexes for various parts of the code, they just cause
lock ordering issues (and much of the time, the RTNL and a
few of the others need thus be held.)
Simplify all this by getting rid of the extra four mutexes
and just use the RTNL throughout. Only a few code changes
were needed to do this and we can get rid of a work struct
for bonus points.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/debugfs.c')
-rw-r--r-- | net/wireless/debugfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c index 920cabe0461b..90d050036624 100644 --- a/net/wireless/debugfs.c +++ b/net/wireless/debugfs.c @@ -74,7 +74,7 @@ static ssize_t ht40allow_map_read(struct file *file, if (!buf) return -ENOMEM; - mutex_lock(&cfg80211_mutex); + rtnl_lock(); for (band = 0; band < IEEE80211_NUM_BANDS; band++) { sband = wiphy->bands[band]; @@ -85,7 +85,7 @@ static ssize_t ht40allow_map_read(struct file *file, buf, buf_size, offset); } - mutex_unlock(&cfg80211_mutex); + rtnl_unlock(); r = simple_read_from_buffer(user_buf, count, ppos, buf, offset); |