Skip to contentSkip to conversation

ocfs2/trivial: Wrap ocfs2_sysfile_cluster_lock_key within define.

PATCH New Tao Ma 2 participants 2 messages Jun 18, 2009 – Jun 20, 2009 OCFS2

lore
Share & tools
lore

Tao Ma

author
#0 lore raw

PATCH 1/1 ocfs2/trivial: Wrap ocfs2_sysfile_cluster_lock_key within define.

Actually ocfs2_sysfile_cluster_lock_key is only used if we enable CONFIG_DEBUG_LOCK_ALLOC. Wrap it so that we can avoid a building warning.
fs/ocfs2/sysfile.c:53: warning: ?ocfs2_sysfile_cluster_lock_key? defined but not used

---
 fs/ocfs2/sysfile.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/ocfs2/sysfile.c +2 -0
index 6f53f5e..40e5370 100644
@@ -50,7 +50,9 @@ static inline int is_in_system_inode_array(struct ocfs2_super *osb,
 					   int type,
 					   u32 slot);
 
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
 static struct lock_class_key ocfs2_sysfile_cluster_lock_key[NUM_SYSTEM_INODES];
+#endif
 
 static inline int is_global_system_inode(int type)
 {
Signature · 1 line
1.6.2.rc2.16.gf474c
#1 lore raw

PATCH 1/1 ocfs2/trivial: Wrap ocfs2_sysfile_cluster_lock_key within define.

Quoted 7 lines · Tao Ma

Actually ocfs2_sysfile_cluster_lock_key is only used if we enable CONFIG_DEBUG_LOCK_ALLOC. Wrap it so that we can avoid a building warning.
fs/ocfs2/sysfile.c:53: warning: ?ocfs2_sysfile_cluster_lock_key? defined but not used

This is now in the lockdep branch of ocfs2.git.

Joel

Signature · 11 lines
The Graham Corollary:

	The longer a socially-moderated news website exists, the
	probability of an old Paul Graham link appearing at the top
	approaches certainty.

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127