include/linux/filelock.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
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>
On Sat, 16 May 2026 07:11:23 -0400, Jeff Layton wrote:
> 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.
Applied to the vfs-7.2.directory.delegations branch of the vfs/vfs.git tree.
Patches in the vfs-7.2.directory.delegations branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.2.directory.delegations
[1/1] filelock: move LEASE_BREAK_* flags out of #ifdef CONFIG_FILE_LOCKING
https://git.kernel.org/vfs/vfs/c/246bc86d0fd8
© 2016 - 2026 Red Hat, Inc.