smack: Fix gcc warning from unused smack_syslog_lock mutex in smackfs.c 90/164090/1 accepted/tizen_4.0_unified accepted/tizen/4.0/unified/20171218.072033 accepted/tizen/unified/20171218.072335 submit/tizen/20171218.021305 submit/tizen_4.0/20171218.021435 tizen_4.0.IoT.p2_release
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 23 Mar 2015 18:03:17 +0000 (14:03 -0400)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 15 Dec 2017 07:47:03 +0000 (16:47 +0900)
In commit 00f84f3f2e9d088f06722f4351d67f5f577abe22 ("Smack: Make the
syslog control configurable") this mutex was added, but the rest of
the final commit never actually made use of it, resulting in:

 In file included from include/linux/mutex.h:29:0,
                  from include/linux/notifier.h:13,
                  from include/linux/memory_hotplug.h:6,
                  from include/linux/mmzone.h:821,
                  from include/linux/gfp.h:5,
                  from include/linux/slab.h:14,
                  from include/linux/security.h:27,
                  from security/smack/smackfs.c:21:
 security/smack/smackfs.c:63:21: warning: ‘smack_syslog_lock’ defined but not used [-Wunused-variable]
  static DEFINE_MUTEX(smack_syslog_lock);
                      ^

A git grep shows no other instances/references to smack_syslog_lock.
Delete it, assuming that the mutex addition was just a leftover from
an earlier work in progress version of the change.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
[sw0312.kim: backport from mainline commit f43b65bad6d5 to remove build warning cuased by backported commit]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id1a38438a4f11f0cf4dff7cbf94e567a90de88fe

security/smack/smackfs.c

index ae49ed6..446015f 100644 (file)
@@ -65,7 +65,6 @@ enum smk_inos {
  */
 static DEFINE_MUTEX(smack_cipso_lock);
 static DEFINE_MUTEX(smack_ambient_lock);
-static DEFINE_MUTEX(smack_syslog_lock);
 static DEFINE_MUTEX(smk_netlbladdr_lock);
 
 /*