mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
virtiofsd: Fix fuse setxattr() API change issue
With kernel header updates fuse_setxattr_in struct has grown in size.
But this new struct size only takes affect if user has opted in
for fuse feature FUSE_SETXATTR_EXT otherwise fuse continues to
send "fuse_setxattr_in" of older size. Older size is determined
by FUSE_COMPAT_SETXATTR_IN_SIZE.
Fix this. If we have not opted in for FUSE_SETXATTR_EXT, then
expect that we will get fuse_setxattr_in of size FUSE_COMPAT_SETXATTR_IN_SIZE
and not sizeof(struct fuse_sexattr_in).
Fixes: 278f064e45
("Update Linux headers to 5.13-rc4")
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20210622150852.1507204-2-vgoyal@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
1d03e56607
commit
061624455f
2 changed files with 11 additions and 1 deletions
|
@ -372,6 +372,11 @@ struct fuse_file_info {
|
|||
*/
|
||||
#define FUSE_CAP_HANDLE_KILLPRIV_V2 (1 << 28)
|
||||
|
||||
/**
|
||||
* Indicates that file server supports extended struct fuse_setxattr_in
|
||||
*/
|
||||
#define FUSE_CAP_SETXATTR_EXT (1 << 29)
|
||||
|
||||
/**
|
||||
* Ioctl flags
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue