aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-01-22 07:13:11 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-14 17:27:52 -0500
commita652d7081bc96b3094e85ca30e47f50185d2f717 (patch)
tree859a784cf389f2835cd0f91cf625f16ed36198c8 /kernel
parent4fc95e867f1e75351b89db3c68212dfcce7ea563 (diff)
lockdep: sanitize reclaim bit names
s/HELD_OVER/ENABLED/g so that its similar to the hard and soft-irq names. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/lockdep.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 32f944752b18..dd4716c08325 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -458,8 +458,8 @@ static const char *usage_str[] =
458 [LOCK_ENABLED_HARDIRQ_READ] = "hardirq-on-R", 458 [LOCK_ENABLED_HARDIRQ_READ] = "hardirq-on-R",
459 [LOCK_USED_IN_RECLAIM_FS] = "in-reclaim-W", 459 [LOCK_USED_IN_RECLAIM_FS] = "in-reclaim-W",
460 [LOCK_USED_IN_RECLAIM_FS_READ] = "in-reclaim-R", 460 [LOCK_USED_IN_RECLAIM_FS_READ] = "in-reclaim-R",
461 [LOCK_HELD_OVER_RECLAIM_FS] = "ov-reclaim-W", 461 [LOCK_ENABLED_RECLAIM_FS] = "ov-reclaim-W",
462 [LOCK_HELD_OVER_RECLAIM_FS_READ] = "ov-reclaim-R", 462 [LOCK_ENABLED_RECLAIM_FS_READ] = "ov-reclaim-R",
463}; 463};
464 464
465const char * __get_key_name(struct lockdep_subclass_key *key, char *str) 465const char * __get_key_name(struct lockdep_subclass_key *key, char *str)
@@ -504,14 +504,14 @@ get_usage_chars(struct lock_class *class, char *c1, char *c2, char *c3,
504 if (class->usage_mask & LOCKF_USED_IN_RECLAIM_FS) 504 if (class->usage_mask & LOCKF_USED_IN_RECLAIM_FS)
505 *c5 = '+'; 505 *c5 = '+';
506 else 506 else
507 if (class->usage_mask & LOCKF_HELD_OVER_RECLAIM_FS) 507 if (class->usage_mask & LOCKF_ENABLED_RECLAIM_FS)
508 *c5 = '-'; 508 *c5 = '-';
509 509
510 if (class->usage_mask & LOCKF_HELD_OVER_RECLAIM_FS_READ) 510 if (class->usage_mask & LOCKF_ENABLED_RECLAIM_FS_READ)
511 *c6 = '-'; 511 *c6 = '-';
512 if (class->usage_mask & LOCKF_USED_IN_RECLAIM_FS_READ) { 512 if (class->usage_mask & LOCKF_USED_IN_RECLAIM_FS_READ) {
513 *c6 = '+'; 513 *c6 = '+';
514 if (class->usage_mask & LOCKF_HELD_OVER_RECLAIM_FS_READ) 514 if (class->usage_mask & LOCKF_ENABLED_RECLAIM_FS_READ)
515 *c6 = '?'; 515 *c6 = '?';
516 } 516 }
517 517
@@ -1335,7 +1335,7 @@ check_prev_add_irq(struct task_struct *curr, struct held_lock *prev,
1335 * forwards-subgraph starting at <next>: 1335 * forwards-subgraph starting at <next>:
1336 */ 1336 */
1337 if (!check_usage(curr, prev, next, LOCK_USED_IN_RECLAIM_FS, 1337 if (!check_usage(curr, prev, next, LOCK_USED_IN_RECLAIM_FS,
1338 LOCK_HELD_OVER_RECLAIM_FS, "reclaim-fs")) 1338 LOCK_ENABLED_RECLAIM_FS, "reclaim-fs"))
1339 return 0; 1339 return 0;
1340 1340
1341 /* 1341 /*
@@ -1345,7 +1345,7 @@ check_prev_add_irq(struct task_struct *curr, struct held_lock *prev,
1345 * forwards-subgraph starting at <next>: 1345 * forwards-subgraph starting at <next>:
1346 */ 1346 */
1347 if (!check_usage(curr, prev, next, LOCK_USED_IN_RECLAIM_FS_READ, 1347 if (!check_usage(curr, prev, next, LOCK_USED_IN_RECLAIM_FS_READ,
1348 LOCK_HELD_OVER_RECLAIM_FS, "reclaim-fs-read")) 1348 LOCK_ENABLED_RECLAIM_FS, "reclaim-fs-read"))
1349 return 0; 1349 return 0;
1350 1350
1351 return 1; 1351 return 1;
@@ -2058,17 +2058,17 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
2058 ret = 2; 2058 ret = 2;
2059 break; 2059 break;
2060 case LOCK_USED_IN_RECLAIM_FS: 2060 case LOCK_USED_IN_RECLAIM_FS:
2061 if (!valid_state(curr, this, new_bit, LOCK_HELD_OVER_RECLAIM_FS)) 2061 if (!valid_state(curr, this, new_bit, LOCK_ENABLED_RECLAIM_FS))
2062 return 0; 2062 return 0;
2063 if (!valid_state(curr, this, new_bit, 2063 if (!valid_state(curr, this, new_bit,
2064 LOCK_HELD_OVER_RECLAIM_FS_READ)) 2064 LOCK_ENABLED_RECLAIM_FS_READ))
2065 return 0; 2065 return 0;
2066 /* 2066 /*
2067 * just marked it reclaim-fs-safe, check that this lock 2067 * just marked it reclaim-fs-safe, check that this lock
2068 * took no reclaim-fs-unsafe lock in the past: 2068 * took no reclaim-fs-unsafe lock in the past:
2069 */ 2069 */
2070 if (!check_usage_forwards(curr, this, 2070 if (!check_usage_forwards(curr, this,
2071 LOCK_HELD_OVER_RECLAIM_FS, "reclaim-fs")) 2071 LOCK_ENABLED_RECLAIM_FS, "reclaim-fs"))
2072 return 0; 2072 return 0;
2073#if STRICT_READ_CHECKS 2073#if STRICT_READ_CHECKS
2074 /* 2074 /*
@@ -2076,7 +2076,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
2076 * took no reclaim-fs-unsafe-read lock in the past: 2076 * took no reclaim-fs-unsafe-read lock in the past:
2077 */ 2077 */
2078 if (!check_usage_forwards(curr, this, 2078 if (!check_usage_forwards(curr, this,
2079 LOCK_HELD_OVER_RECLAIM_FS_READ, "reclaim-fs-read")) 2079 LOCK_ENABLED_RECLAIM_FS_READ, "reclaim-fs-read"))
2080 return 0; 2080 return 0;
2081#endif 2081#endif
2082 if (reclaim_verbose(hlock_class(this))) 2082 if (reclaim_verbose(hlock_class(this)))
@@ -2109,14 +2109,14 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
2109 ret = 2; 2109 ret = 2;
2110 break; 2110 break;
2111 case LOCK_USED_IN_RECLAIM_FS_READ: 2111 case LOCK_USED_IN_RECLAIM_FS_READ:
2112 if (!valid_state(curr, this, new_bit, LOCK_HELD_OVER_RECLAIM_FS)) 2112 if (!valid_state(curr, this, new_bit, LOCK_ENABLED_RECLAIM_FS))
2113 return 0; 2113 return 0;
2114 /* 2114 /*
2115 * just marked it reclaim-fs-read-safe, check that this lock 2115 * just marked it reclaim-fs-read-safe, check that this lock
2116 * took no reclaim-fs-unsafe lock in the past: 2116 * took no reclaim-fs-unsafe lock in the past:
2117 */ 2117 */
2118 if (!check_usage_forwards(curr, this, 2118 if (!check_usage_forwards(curr, this,
2119 LOCK_HELD_OVER_RECLAIM_FS, "reclaim-fs")) 2119 LOCK_ENABLED_RECLAIM_FS, "reclaim-fs"))
2120 return 0; 2120 return 0;
2121 if (reclaim_verbose(hlock_class(this))) 2121 if (reclaim_verbose(hlock_class(this)))
2122 ret = 2; 2122 ret = 2;
@@ -2173,7 +2173,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
2173 if (softirq_verbose(hlock_class(this))) 2173 if (softirq_verbose(hlock_class(this)))
2174 ret = 2; 2174 ret = 2;
2175 break; 2175 break;
2176 case LOCK_HELD_OVER_RECLAIM_FS: 2176 case LOCK_ENABLED_RECLAIM_FS:
2177 if (!valid_state(curr, this, new_bit, LOCK_USED_IN_RECLAIM_FS)) 2177 if (!valid_state(curr, this, new_bit, LOCK_USED_IN_RECLAIM_FS))
2178 return 0; 2178 return 0;
2179 if (!valid_state(curr, this, new_bit, 2179 if (!valid_state(curr, this, new_bit,
@@ -2229,7 +2229,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
2229 if (softirq_verbose(hlock_class(this))) 2229 if (softirq_verbose(hlock_class(this)))
2230 ret = 2; 2230 ret = 2;
2231 break; 2231 break;
2232 case LOCK_HELD_OVER_RECLAIM_FS_READ: 2232 case LOCK_ENABLED_RECLAIM_FS_READ:
2233 if (!valid_state(curr, this, new_bit, LOCK_USED_IN_RECLAIM_FS)) 2233 if (!valid_state(curr, this, new_bit, LOCK_USED_IN_RECLAIM_FS))
2234 return 0; 2234 return 0;
2235#if STRICT_READ_CHECKS 2235#if STRICT_READ_CHECKS
@@ -2288,9 +2288,9 @@ mark_held_locks(struct task_struct *curr, enum mark_type mark)
2288 2288
2289 case RECLAIM_FS: 2289 case RECLAIM_FS:
2290 if (hlock->read) 2290 if (hlock->read)
2291 usage_bit = LOCK_HELD_OVER_RECLAIM_FS_READ; 2291 usage_bit = LOCK_ENABLED_RECLAIM_FS_READ;
2292 else 2292 else
2293 usage_bit = LOCK_HELD_OVER_RECLAIM_FS; 2293 usage_bit = LOCK_ENABLED_RECLAIM_FS;
2294 break; 2294 break;
2295 2295
2296 default: 2296 default:
@@ -2646,8 +2646,8 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
2646 case LOCK_ENABLED_SOFTIRQ_READ: 2646 case LOCK_ENABLED_SOFTIRQ_READ:
2647 case LOCK_USED_IN_RECLAIM_FS: 2647 case LOCK_USED_IN_RECLAIM_FS:
2648 case LOCK_USED_IN_RECLAIM_FS_READ: 2648 case LOCK_USED_IN_RECLAIM_FS_READ:
2649 case LOCK_HELD_OVER_RECLAIM_FS: 2649 case LOCK_ENABLED_RECLAIM_FS:
2650 case LOCK_HELD_OVER_RECLAIM_FS_READ: 2650 case LOCK_ENABLED_RECLAIM_FS_READ:
2651 ret = mark_lock_irq(curr, this, new_bit); 2651 ret = mark_lock_irq(curr, this, new_bit);
2652 if (!ret) 2652 if (!ret)
2653 return 0; 2653 return 0;