]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: convert to fileattr
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 8 Apr 2021 09:11:19 +0000 (11:11 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 12 Apr 2021 13:04:30 +0000 (15:04 +0200)
commit8d3ed4dba7683c38c5b261a8421f61d6e6a12aec
tree7851feb59c59137c5eab10c974a011ea56cdc98a
parenta7b23dfb4196bd2066d871add2997e937508c8c4
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>
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/fuse/ioctl.c