lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240212112620.1272058-1-arnd@kernel.org>
Date: Mon, 12 Feb 2024 12:26:11 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: NeilBrown <neilb@...e.de>,
	Christian Brauner <brauner@...nel.org>,
	Jeff Layton <jlayton@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>,
	Luca Vizzarro <Luca.Vizzarro@....com>,
	Tom Talpey <tom@...pey.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] filelock: ignore 'lock' argument to for_each_file_lock()

From: Arnd Bergmann <arnd@...db.de>

When CONFIG_FILE_LOCKING is disabled, ceph causes a warning about
a variable that is only used insode of the for_each_file_lock()
loop:

fs/ceph/locks.c: In function 'ceph_count_locks':
fs/ceph/locks.c:380:27: error: unused variable 'lock' [-Werror=unused-variable]
  380 |         struct file_lock *lock;

Rather than working around this in ceph, change the macro definition
to still contain a reference to the variable in order to shut up the
warning.

Fixes: 75cabec0111b ("filelock: add some new helper functions")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 include/linux/filelock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/filelock.h b/include/linux/filelock.h
index aabd4bdf7eba..69290173280a 100644
--- a/include/linux/filelock.h
+++ b/include/linux/filelock.h
@@ -283,7 +283,7 @@ static inline void locks_wake_up(struct file_lock *fl)
 {
 }
 
-#define for_each_file_lock(_fl, _head)	while(false)
+#define for_each_file_lock(_fl, _head)	while((void)_fl, false)
 
 static inline void
 locks_free_lock_context(struct inode *inode)
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ