Arnd Bergmann
15fd0cd9a2
net: autoconvert trivial BKL users to private mutex
...
All these files use the big kernel lock in a trivial
way to serialize their private file operations,
typically resulting from an earlier semi-automatic
pushdown from VFS.
None of these drivers appears to want to lock against
other code, and they all use the BKL as the top-level
lock in their file operations, meaning that there
is no lock-order inversion problem.
Consequently, we can remove the BKL completely,
replacing it with a per-file mutex in every case.
Using a scripted approach means we can avoid
typos.
file=$1
name=$2
if grep -q lock_kernel ${file} ; then
if grep -q 'include.*linux.mutex.h' ${file} ; then
sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
else
sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
fi
sed -i ${file} \
-e "/^#include.*linux.mutex.h/,$ {
1,/^\(static\|int\|long\)/ {
/^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);
} }" \
-e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
-e '/[ ]*cycle_kernel_lock();/d'
else
sed -i -e '/include.*\<smp_lock.h\>/d' ${file} \
-e '/cycle_kernel_lock()/d'
fi
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-12 20:21:47 -07:00
..
2010-05-14 00:19:28 -07:00
2010-05-31 00:35:13 -07:00
2010-06-01 00:16:53 -07:00
2010-06-01 00:28:12 -07:00
2010-05-14 00:19:28 -07:00
2010-06-03 03:18:23 -07:00
2010-07-10 19:42:05 -07:00
2010-07-07 15:59:38 -07:00
2010-06-29 00:08:21 -07:00
2010-06-06 17:42:02 -07:00
2010-06-03 03:18:20 -07:00
2010-05-10 05:01:31 -07:00
2010-07-08 23:12:27 -07:00
2010-07-11 17:33:48 -07:00
2010-07-12 20:21:41 -07:00
2010-06-13 18:20:53 -07:00
2010-06-29 23:09:19 -07:00
2010-07-01 22:45:52 -07:00
2010-06-30 14:09:35 -07:00
2010-05-31 05:46:45 -07:00
2010-05-28 01:57:18 -07:00
2010-05-22 00:36:56 -06:00
2010-07-05 18:50:54 -07:00
2010-05-20 21:04:44 -07:00
2010-06-03 03:18:23 -07:00
2010-05-14 03:06:19 -07:00
2010-07-07 15:59:38 -07:00
2010-06-05 03:04:50 -07:00
2010-05-10 05:01:31 -07:00
2010-06-28 23:04:10 -07:00
2010-06-30 14:09:35 -07:00
2010-06-30 14:09:36 -07:00
2010-06-28 23:58:53 -07:00
2010-06-25 21:16:58 -07:00
2010-07-07 15:59:38 -07:00
2010-07-09 17:41:58 -07:00
2010-07-07 15:59:38 -07:00
2010-07-08 23:12:29 -07:00
2010-05-17 22:47:34 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-06-03 03:18:23 -07:00
2010-07-07 15:59:38 -07:00
2010-06-30 14:09:36 -07:00
2010-07-07 15:59:38 -07:00
2010-07-12 20:21:47 -07:00
2010-06-11 13:32:31 -07:00
2010-07-01 17:34:14 -07:00
2010-06-29 23:14:21 -07:00
2010-05-14 00:19:28 -07:00
2009-09-01 01:13:50 -07:00
2010-05-14 00:19:28 -07:00
2010-05-10 05:01:31 -07:00
2010-05-28 01:57:18 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-05-10 05:01:31 -07:00
2010-04-03 14:22:15 -07:00
2010-06-03 03:18:23 -07:00
2010-05-14 00:19:28 -07:00
2010-06-11 13:32:31 -07:00
2010-06-11 13:32:31 -07:00
2009-09-01 01:14:07 -07:00
2009-09-01 01:14:07 -07:00
2009-09-01 01:14:07 -07:00
2010-07-10 19:42:06 -07:00
2010-05-18 23:01:55 -07:00
2010-07-11 18:15:08 -07:00
2010-05-14 00:19:28 -07:00
2010-04-01 18:38:33 -07:00
2010-05-10 05:01:31 -07:00
2010-02-22 15:45:51 -08:00
2010-05-14 00:19:28 -07:00
2010-05-18 23:01:55 -07:00
2009-12-04 15:39:55 +01:00
2010-07-11 18:15:08 -07:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-05-10 05:01:31 -07:00
2010-04-07 02:07:49 -07:00
2010-07-08 23:42:40 -07:00
2010-07-07 18:24:29 -07:00
2009-06-15 03:02:23 -07:00
2010-05-10 05:01:31 -07:00
2009-09-17 20:07:53 +02:00
2010-06-15 15:04:10 -07:00
2010-06-15 15:04:10 -07:00
2010-05-14 00:19:28 -07:00
2009-04-04 16:51:14 -07:00
2010-07-08 23:12:27 -07:00
2010-07-04 11:44:00 -07:00
2009-08-12 23:03:00 -07:00
2010-02-17 13:35:44 -08:00
2009-04-27 03:27:43 -07:00
2010-03-29 15:41:47 +02:00
2010-02-17 13:35:44 -08:00
2009-08-12 23:02:59 -07:00
2010-06-14 23:25:19 -07:00
2009-11-05 20:00:29 -08:00
2010-07-07 15:45:00 -07:00
2010-04-19 13:17:05 -07:00
2010-04-23 00:10:52 -07:00
2010-05-17 22:47:34 -07:00
2010-02-26 02:10:14 -08:00
2010-06-25 20:37:21 -07:00
2010-06-25 20:37:20 -07:00
2010-06-25 20:37:19 -07:00
2010-07-07 15:59:38 -07:00
2010-07-05 19:41:14 -07:00
2010-07-05 19:41:12 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-04-03 14:22:15 -07:00
2010-07-12 20:21:40 -07:00
2010-05-14 00:19:28 -07:00
2010-01-07 23:54:26 -08:00
2010-06-03 03:18:23 -07:00
2009-11-11 19:22:21 -08:00
2010-05-10 05:01:31 -07:00
2009-03-11 23:26:02 -07:00
2009-09-01 01:13:40 -07:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-05-10 05:01:31 -07:00
2010-07-05 19:41:14 -07:00
2010-05-17 22:47:34 -07:00
2010-05-14 00:19:28 -07:00
2010-05-10 05:01:31 -07:00
2010-07-07 18:23:19 -07:00
2010-05-14 00:19:28 -07:00
2010-07-05 19:41:13 -07:00
2010-06-02 03:45:22 -07:00
2010-07-08 23:44:26 -07:00
2010-06-25 21:33:14 -07:00
2010-05-24 00:36:13 -07:00
2010-07-05 22:15:47 -07:00
2010-05-22 00:36:56 -06:00
2010-06-03 03:18:23 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-07-07 15:54:54 -07:00
2010-06-30 11:35:43 -07:00
2010-06-07 01:08:11 -07:00
2010-02-17 15:59:40 -08:00
2010-07-05 19:41:15 -07:00
2010-07-05 19:41:16 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-03-30 22:02:32 +09:00
2010-05-17 21:37:41 +02:00
2010-04-11 14:53:53 -07:00
2010-05-17 22:55:10 -07:00
2010-05-10 05:01:31 -07:00
2010-07-05 19:41:12 -07:00
2010-04-11 14:53:53 -07:00
2010-03-30 23:42:26 -07:00
2010-04-11 14:53:53 -07:00
2010-07-12 20:21:44 -07:00
2010-05-17 22:47:34 -07:00
2010-03-18 21:14:00 -07:00
2010-07-07 15:45:00 -07:00
2010-06-02 06:12:19 -07:00
2010-07-08 23:40:20 -07:00
2010-04-11 14:53:53 -07:00
2010-05-05 21:27:45 -07:00
2010-05-05 21:27:44 -07:00
2010-07-05 19:41:17 -07:00
2010-07-05 19:41:16 -07:00
2010-03-30 22:02:32 +09:00
2010-05-14 00:19:28 -07:00
2010-06-21 13:50:18 -07:00
2010-07-12 20:21:42 -07:00
2010-03-30 22:02:32 +09:00
2010-05-26 20:44:30 -07:00
2010-05-14 00:19:28 -07:00
2010-07-07 14:58:56 -07:00
2010-05-10 05:01:31 -07:00
2010-07-05 19:41:18 -07:00
2010-06-03 03:18:20 -07:00
2010-05-10 05:01:31 -07:00
2010-04-11 14:53:53 -07:00
2010-05-10 05:01:31 -07:00
2010-07-12 20:21:44 -07:00
2010-07-09 17:41:56 -07:00
2010-07-10 19:25:50 -07:00
2010-06-29 15:32:44 -07:00
2009-10-12 23:59:08 -07:00
2010-05-14 00:19:28 -07:00
2009-09-03 20:02:11 -07:00
2010-06-21 13:40:25 -07:00
2010-07-07 15:59:38 -07:00
2010-03-30 22:02:32 +09:00
2010-05-22 00:36:56 -06:00
2010-07-05 19:41:17 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-07-05 20:08:05 -07:00
2010-05-06 00:47:21 -07:00
2010-05-10 05:01:31 -07:00
2010-07-05 19:41:19 -07:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-07-07 18:20:30 -07:00
2010-04-22 15:48:17 -07:00
2010-07-05 19:41:18 -07:00
2009-10-12 13:26:39 -07:00
2010-05-14 00:19:28 -07:00
2009-04-27 02:53:49 -07:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-03-30 22:02:32 +09:00
2009-12-03 13:18:01 -08:00
2010-07-12 20:21:47 -07:00
2009-12-03 13:18:01 -08:00
2010-03-30 22:02:32 +09:00
2010-06-09 18:06:14 -07:00
2010-03-30 22:02:32 +09:00
2010-05-10 05:01:31 -07:00
2009-12-02 00:52:31 -08:00
2010-05-20 21:04:44 -07:00
2010-06-03 03:18:23 -07:00
2010-05-14 00:19:28 -07:00
2010-04-13 02:54:17 -07:00
2010-06-01 00:15:50 -07:00
2010-06-11 13:32:31 -07:00
2010-03-30 22:02:32 +09:00
2010-05-10 05:01:31 -07:00
2009-09-01 01:14:07 -07:00
2009-04-29 17:32:34 -07:00
2010-07-07 15:59:38 -07:00
2010-07-02 22:27:25 -07:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-07-07 15:00:49 -07:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-05-10 05:01:31 -07:00
2010-07-07 15:45:00 -07:00
2009-10-13 03:44:05 -07:00
2010-04-11 14:53:53 -07:00
2010-05-14 00:19:28 -07:00
2010-05-15 23:29:31 -07:00
2010-05-15 23:29:31 -07:00
2010-06-30 14:09:35 -07:00
2010-06-03 03:18:23 -07:00
2010-05-14 00:19:28 -07:00
2010-05-17 22:47:34 -07:00
2010-05-10 05:01:31 -07:00
2010-03-10 07:37:06 -08:00
2010-05-10 05:01:31 -07:00
2010-02-15 09:27:02 -08:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-05-20 21:04:44 -07:00
2009-12-04 15:39:55 +01:00
2010-05-10 05:01:31 -07:00
2009-02-20 00:38:51 -08:00
2010-03-30 22:02:32 +09:00
2010-05-10 05:01:31 -07:00
2010-05-14 00:19:28 -07:00
2010-07-05 19:41:15 -07:00
2010-05-14 00:19:28 -07:00
2010-07-05 19:41:11 -07:00
2010-05-10 05:01:31 -07:00
2010-05-22 00:36:56 -06:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2009-12-03 13:18:01 -08:00
2010-05-22 00:36:56 -06:00
2010-05-22 00:36:56 -06:00
2010-05-22 00:36:56 -06:00
2010-05-10 05:01:31 -07:00
2010-07-12 20:21:42 -07:00
2010-06-03 03:28:23 -07:00
2010-06-03 03:18:23 -07:00
2010-07-11 17:07:44 -07:00
2010-07-11 17:07:43 -07:00
2010-05-10 05:01:31 -07:00
2010-01-13 20:37:01 -08:00
2010-04-14 16:11:33 -07:00
2010-05-25 16:59:51 -07:00
2010-06-03 03:18:23 -07:00
2010-06-03 03:18:23 -07:00
2010-03-30 22:02:32 +09:00
2010-06-23 18:26:27 -07:00
2010-06-03 03:18:23 -07:00
2010-05-06 00:53:53 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-03 03:18:23 -07:00
2010-07-02 22:27:26 -07:00
2010-05-14 00:19:28 -07:00
2010-05-31 00:27:44 -07:00
2010-05-22 00:36:56 -06:00
2010-07-12 20:21:45 -07:00
2010-05-14 00:19:28 -07:00
2010-05-14 00:19:28 -07:00
2010-05-18 23:01:55 -07:00