aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 22:36:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 22:36:02 -0400
commitcf5434e894a17bb8385997adc6d56642055a85d6 (patch)
tree60a02d312038f24ca24578ebefb47391d4a63c13 /include/linux
parent7b58fc21847950db8fcc6a142288b042564ffb76 (diff)
parentd246ab307d1d003c80fe279897dea22bf52b6e41 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: ocfs2/trivial: Wrap ocfs2_sysfile_cluster_lock_key within define. ocfs2: Add lockdep annotations vfs: Set special lockdep map for dirs only if not set by fs ocfs2: Disable orphan scanning for local and hard-ro mounts ocfs2: Do not initialize lvb in ocfs2_orphan_scan_lock_res_init() ocfs2: Stop orphan scan as early as possible during umount ocfs2: Fix ocfs2_osb_dump() ocfs2: Pin journal head before accessing jh->b_committed_data ocfs2: Update atime in splice read if necessary. ocfs2: Provide the ocfs2_dlm_lvb_valid() stack API.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/lockdep.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index da5a5a1f4cd2..b25d1b53df0d 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -258,6 +258,16 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
258#define lockdep_set_subclass(lock, sub) \ 258#define lockdep_set_subclass(lock, sub) \
259 lockdep_init_map(&(lock)->dep_map, #lock, \ 259 lockdep_init_map(&(lock)->dep_map, #lock, \
260 (lock)->dep_map.key, sub) 260 (lock)->dep_map.key, sub)
261/*
262 * Compare locking classes
263 */
264#define lockdep_match_class(lock, key) lockdep_match_key(&(lock)->dep_map, key)
265
266static inline int lockdep_match_key(struct lockdep_map *lock,
267 struct lock_class_key *key)
268{
269 return lock->key == key;
270}
261 271
262/* 272/*
263 * Acquire a lock. 273 * Acquire a lock.
@@ -326,6 +336,11 @@ static inline void lockdep_on(void)
326#define lockdep_set_class_and_subclass(lock, key, sub) \ 336#define lockdep_set_class_and_subclass(lock, key, sub) \
327 do { (void)(key); } while (0) 337 do { (void)(key); } while (0)
328#define lockdep_set_subclass(lock, sub) do { } while (0) 338#define lockdep_set_subclass(lock, sub) do { } while (0)
339/*
340 * We don't define lockdep_match_class() and lockdep_match_key() for !LOCKDEP
341 * case since the result is not well defined and the caller should rather
342 * #ifdef the call himself.
343 */
329 344
330# define INIT_LOCKDEP 345# define INIT_LOCKDEP
331# define lockdep_reset() do { debug_locks = 1; } while (0) 346# define lockdep_reset() do { debug_locks = 1; } while (0)