diff options
| author | Jeff Layton <jlayton@kernel.org> | 2026-01-08 20:13:16 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-01-12 12:55:48 +0300 |
| commit | 545b4144d804604126c369dd5bd66ff1e668c7d9 (patch) | |
| tree | c9535c6ac99a9b1b4620a95560695da624c84c3d | |
| parent | dbe8d57d148327a39dc4921aa1d3434ea259945e (diff) | |
| download | linux-545b4144d804604126c369dd5bd66ff1e668c7d9.tar.xz | |
ufs: add setlease file operation
Add the setlease file_operation pointing to generic_setlease to the ufs
file_operations structures. 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 <jlayton@kernel.org>
Link: https://patch.msgid.link/20260108-setlease-6-20-v1-21-ea4dec9b67fa@kernel.org
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
| -rw-r--r-- | fs/ufs/dir.c | 2 | ||||
| -rw-r--r-- | fs/ufs/file.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/ufs/dir.c b/fs/ufs/dir.c index 0388a1bae326..43f1578ab866 100644 --- a/fs/ufs/dir.c +++ b/fs/ufs/dir.c @@ -19,6 +19,7 @@ #include <linux/time.h> #include <linux/fs.h> +#include <linux/filelock.h> #include <linux/swap.h> #include <linux/iversion.h> @@ -653,4 +654,5 @@ const struct file_operations ufs_dir_operations = { .iterate_shared = ufs_readdir, .fsync = generic_file_fsync, .llseek = ufs_dir_llseek, + .setlease = generic_setlease, }; diff --git a/fs/ufs/file.c b/fs/ufs/file.c index c2a391c17df7..809c7a4603f8 100644 --- a/fs/ufs/file.c +++ b/fs/ufs/file.c @@ -25,6 +25,7 @@ */ #include <linux/fs.h> +#include <linux/filelock.h> #include "ufs_fs.h" #include "ufs.h" @@ -43,4 +44,5 @@ const struct file_operations ufs_file_operations = { .fsync = generic_file_fsync, .splice_read = filemap_splice_read, .splice_write = iter_file_splice_write, + .setlease = generic_setlease, }; |
