mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
affs: add setlease file operation
Add the setlease file_operation to affs_file_operations and affs_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 <jlayton@kernel.org> Link: https://patch.msgid.link/20260108-setlease-6-20-v1-2-ea4dec9b67fa@kernel.org Acked-by: David Sterba <dsterba@suse.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
ca4388bf1d
commit
663cdef61a
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/iversion.h>
|
||||
#include <linux/filelock.h>
|
||||
#include "affs.h"
|
||||
|
||||
struct affs_dir_data {
|
||||
@@ -55,6 +56,7 @@ const struct file_operations affs_dir_operations = {
|
||||
.iterate_shared = affs_readdir,
|
||||
.fsync = affs_file_fsync,
|
||||
.release = affs_dir_release,
|
||||
.setlease = generic_setlease,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <linux/uio.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/filelock.h>
|
||||
#include <linux/mpage.h>
|
||||
#include "affs.h"
|
||||
|
||||
@@ -1008,6 +1009,7 @@ const struct file_operations affs_file_operations = {
|
||||
.release = affs_file_release,
|
||||
.fsync = affs_file_fsync,
|
||||
.splice_read = filemap_splice_read,
|
||||
.setlease = generic_setlease,
|
||||
};
|
||||
|
||||
const struct inode_operations affs_file_inode_operations = {
|
||||
|
||||
Reference in New Issue
Block a user