Skip to contentSkip to conversation

ocfs2: Fix a GCC compiled warning.

PATCH New zhong jiang 1 participant 1 message Sep 14, 2018 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: Fix a GCC compiled warning.

Fix the following compile warning:

fs/ocfs2/dlmglue.c:99:30: warning: ‘lockdep_keys’ defined but not used [-Wunused-variable]
static struct lock_class_key lockdep_keys[OCFS2_NUM_LOCK_TYPES];

---
 fs/ocfs2/dlmglue.c | 2 ++
 1 file changed, 2 insertions(+)
fs/ocfs2/dlmglue.c +2 -0
index 040ddb6..7c83582 100644
@@ -96,7 +96,9 @@ struct ocfs2_unblock_ctl {
 };
 
 /* Lockdep class keys */
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
 static struct lock_class_key lockdep_keys[OCFS2_NUM_LOCK_TYPES];
+#endif
 
 static int ocfs2_check_meta_downconvert(struct ocfs2_lock_res *lockres,
 					int new_level);
Signature · 1 line
1.7.12.4