From: Jeff Layton Date: Thu, 8 Jan 2026 17:13:11 +0000 (-0500) Subject: orangefs: add setlease file operation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=136b43aa4b16563c8010c90c53303b745340d70f;p=thirdparty%2Fkernel%2Flinux.git orangefs: add setlease file operation Add the setlease file_operation to orangefs_file_operations and orangefs_dir_operations, pointing to generic_setlease. A future patch will change the default behavior to reject lease attempts with -EINVAL when there is no setlease file operation defined. Add generic_setlease to retain the ability to set leases on this filesystem. Signed-off-by: Jeff Layton Link: https://patch.msgid.link/20260108-setlease-6-20-v1-16-ea4dec9b67fa@kernel.org Acked-by: Al Viro Acked-by: Christoph Hellwig Signed-off-by: Christian Brauner --- diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index 6d1fbeca9d817..3c32bf9f1296e 100644 --- a/fs/orangefs/dir.c +++ b/fs/orangefs/dir.c @@ -3,6 +3,7 @@ * Copyright 2017 Omnibond Systems, L.L.C. */ +#include #include "protocol.h" #include "orangefs-kernel.h" #include "orangefs-bufmap.h" @@ -392,5 +393,6 @@ const struct file_operations orangefs_dir_operations = { .read = generic_read_dir, .iterate_shared = orangefs_dir_iterate, .open = orangefs_dir_open, - .release = orangefs_dir_release + .release = orangefs_dir_release, + .setlease = generic_setlease, }; diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 919f99b168341..afd610a3fc688 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -583,4 +583,5 @@ const struct file_operations orangefs_file_operations = { .flush = orangefs_flush, .release = orangefs_file_release, .fsync = orangefs_fsync, + .setlease = generic_setlease, };