From: Tao Ma <tao.ma@oracle.com>
Date: Thu, 18 Jun 2009 05:12:06 +0000 (+0800)
Subject: ocfs2/trivial: Wrap ocfs2_sysfile_cluster_lock_key within define.
X-Git-Tag: firefly_0821_release~13613^2
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d246ab307d1d003c80fe279897dea22bf52b6e41;p=firefly-linux-kernel-4.4.55.git

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

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
---

diff --git a/fs/ocfs2/sysfile.c b/fs/ocfs2/sysfile.c
index 6f53f5e7256a..40e53702948c 100644
--- a/fs/ocfs2/sysfile.c
+++ b/fs/ocfs2/sysfile.c
@@ -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)
 {