mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] filelock: move LEASE_BREAK_* flags out of #ifdef CONFIG_FILE_LOCKING
@ 2026-05-16 11:11 Jeff Layton
  2026-05-16 15:06 ` Christian Brauner
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2026-05-16 11:11 UTC (permalink / raw)
  To: Alexander Viro, Christian Brauner, Jan Kara
  Cc: Chuck Lever, Alexander Aring, linux-kernel, kernel test robot,
	Jeff Layton

This was causing a build break when CONFIG_FILE_LOCKING was disabled.
Move the LEASE_BREAK_* flags into the non-#ifdef'ed part of the file.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605161232.1lY6pZoM-lkp@intel.com/
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
The kernel test robot caught this one. Christian, feel free to fold this
into the patch that introduces the constants.
---
 include/linux/filelock.h | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/include/linux/filelock.h b/include/linux/filelock.h
index 6e125902c58a..7a7a6e8a9a08 100644
--- a/include/linux/filelock.h
+++ b/include/linux/filelock.h
@@ -29,6 +29,15 @@
  */
 #define FILE_LOCK_DEFERRED 1
 
+#define LEASE_BREAK_LEASE		BIT(0)	// break leases and delegations
+#define LEASE_BREAK_DELEG		BIT(1)	// break delegations only
+#define LEASE_BREAK_LAYOUT		BIT(2)	// break layouts only
+#define LEASE_BREAK_NONBLOCK		BIT(3)	// non-blocking break
+#define LEASE_BREAK_OPEN_RDONLY		BIT(4)	// readonly open event
+#define LEASE_BREAK_DIR_CREATE		BIT(5)  // dir deleg create event
+#define LEASE_BREAK_DIR_DELETE		BIT(6)  // dir deleg delete event
+#define LEASE_BREAK_DIR_RENAME		BIT(7)  // dir deleg rename event
+
 struct file_lock;
 struct file_lease;
 
@@ -219,17 +228,6 @@ int locks_lock_inode_wait(struct inode *inode, struct file_lock *fl);
 void locks_init_lease(struct file_lease *);
 void locks_free_lease(struct file_lease *fl);
 struct file_lease *locks_alloc_lease(void);
-
-#define LEASE_BREAK_LEASE		BIT(0)	// break leases and delegations
-#define LEASE_BREAK_DELEG		BIT(1)	// break delegations only
-#define LEASE_BREAK_LAYOUT		BIT(2)	// break layouts only
-#define LEASE_BREAK_NONBLOCK		BIT(3)	// non-blocking break
-#define LEASE_BREAK_OPEN_RDONLY		BIT(4)	// readonly open event
-#define LEASE_BREAK_DIR_CREATE		BIT(5)  // dir deleg create event
-#define LEASE_BREAK_DIR_DELETE		BIT(6)  // dir deleg delete event
-#define LEASE_BREAK_DIR_RENAME		BIT(7)  // dir deleg rename event
-
-
 int __break_lease(struct inode *inode, unsigned int flags);
 void lease_get_mtime(struct inode *, struct timespec64 *time);
 int generic_setlease(struct file *, int, struct file_lease **, void **priv);

---
base-commit: ee4cc056e39316155b8dc186845922d5731a3a7a
change-id: 20260516-dir-deleg-fix-5f272bbafff2

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-16 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-16 11:11 [PATCH] filelock: move LEASE_BREAK_* flags out of #ifdef CONFIG_FILE_LOCKING Jeff Layton
2026-05-16 15:06 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®