aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2021-04-08 11:11:19 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2021-04-12 15:04:30 +0200
commit72227eac177dd126355ab8d8bd71b46af56c5cf3 (patch)
tree7851feb59c59137c5eab10c974a011ea56cdc98a /fs/fuse/dir.c
parentfuse: add internal open/release helpers (diff)
downloadlinux-dev-72227eac177dd126355ab8d8bd71b46af56c5cf3.tar.xz
linux-dev-72227eac177dd126355ab8d8bd71b46af56c5cf3.zip
fuse: convert to fileattr
Since fuse just passes ioctl args through to/from server, converting to the fileattr API is more involved, than most other filesystems. Both .fileattr_set() and .fileattr_get() need to obtain an open file to operate on. The simplest way is with the following sequence: FUSE_OPEN FUSE_IOCTL FUSE_RELEASE If this turns out to be a performance problem, it could be optimized for the case when there's already a file (any file) open for the inode. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index bb5acac73239..44f7bfd825cf 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1866,6 +1866,8 @@ static const struct inode_operations fuse_dir_inode_operations = {
.listxattr = fuse_listxattr,
.get_acl = fuse_get_acl,
.set_acl = fuse_set_acl,
+ .fileattr_get = fuse_fileattr_get,
+ .fileattr_set = fuse_fileattr_set,
};
static const struct file_operations fuse_dir_operations = {
@@ -1886,6 +1888,8 @@ static const struct inode_operations fuse_common_inode_operations = {
.listxattr = fuse_listxattr,
.get_acl = fuse_get_acl,
.set_acl = fuse_set_acl,
+ .fileattr_get = fuse_fileattr_get,
+ .fileattr_set = fuse_fileattr_set,
};
static const struct inode_operations fuse_symlink_inode_operations = {