diff options
Diffstat (limited to 'Documentation/DocBook/kernel-locking.tmpl')
-rw-r--r-- | Documentation/DocBook/kernel-locking.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 2e9d6b41f034..22ebd27a257e 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl | |||
@@ -854,7 +854,7 @@ The change is shown below, in standard patch format: the | |||
854 | }; | 854 | }; |
855 | 855 | ||
856 | -static DEFINE_MUTEX(cache_lock); | 856 | -static DEFINE_MUTEX(cache_lock); |
857 | +static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; | 857 | +static DEFINE_SPINLOCK(cache_lock); |
858 | static LIST_HEAD(cache); | 858 | static LIST_HEAD(cache); |
859 | static unsigned int cache_num = 0; | 859 | static unsigned int cache_num = 0; |
860 | #define MAX_CACHE_SIZE 10 | 860 | #define MAX_CACHE_SIZE 10 |
@@ -1238,7 +1238,7 @@ Here is the "lock-per-object" implementation: | |||
1238 | - int popularity; | 1238 | - int popularity; |
1239 | }; | 1239 | }; |
1240 | 1240 | ||
1241 | static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; | 1241 | static DEFINE_SPINLOCK(cache_lock); |
1242 | @@ -77,6 +84,7 @@ | 1242 | @@ -77,6 +84,7 @@ |
1243 | obj->id = id; | 1243 | obj->id = id; |
1244 | obj->popularity = 0; | 1244 | obj->popularity = 0; |