fuse fixes for 5.17-rc8
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSQHSd0lITzzeNWNm3h3BK/laaZPAUCYidm9QAKCRDh3BK/laaZ PAWVAQCMbTjDZzjk3jPVaCR9xS4mhDfjnQGH6FJmykpheGy59gD6AvdDAtwYsiRq alvwpDyeI6YVueBKst1joFFcnzKEPAU= =sxAr -----END PGP SIGNATURE----- Merge tag 'fuse-fixes-5.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: - Fix an issue with splice on the fuse device - Fix a regression in the fileattr API conversion - Add a small userspace API improvement * tag 'fuse-fixes-5.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix pipe buffer lifetime for direct_io fuse: move FUSE_SUPER_MAGIC definition to magic.h fuse: fix fileattr op failure
This commit is contained in:
Коммит
92f90cc9fe
|
@ -941,7 +941,17 @@ static int fuse_copy_page(struct fuse_copy_state *cs, struct page **pagep,
|
|||
|
||||
while (count) {
|
||||
if (cs->write && cs->pipebufs && page) {
|
||||
/*
|
||||
* Can't control lifetime of pipe buffers, so always
|
||||
* copy user pages.
|
||||
*/
|
||||
if (cs->req->args->user_pages) {
|
||||
err = fuse_copy_fill(cs);
|
||||
if (err)
|
||||
return err;
|
||||
} else {
|
||||
return fuse_ref_page(cs, page, offset, count);
|
||||
}
|
||||
} else if (!cs->len) {
|
||||
if (cs->move_pages && page &&
|
||||
offset == 0 && count == PAGE_SIZE) {
|
||||
|
|
|
@ -1413,6 +1413,7 @@ static int fuse_get_user_pages(struct fuse_args_pages *ap, struct iov_iter *ii,
|
|||
(PAGE_SIZE - ret) & (PAGE_SIZE - 1);
|
||||
}
|
||||
|
||||
ap->args.user_pages = true;
|
||||
if (write)
|
||||
ap->args.in_pages = true;
|
||||
else
|
||||
|
|
|
@ -256,6 +256,7 @@ struct fuse_args {
|
|||
bool nocreds:1;
|
||||
bool in_pages:1;
|
||||
bool out_pages:1;
|
||||
bool user_pages:1;
|
||||
bool out_argvar:1;
|
||||
bool page_zeroing:1;
|
||||
bool page_replace:1;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/exportfs.h>
|
||||
#include <linux/posix_acl.h>
|
||||
#include <linux/pid_namespace.h>
|
||||
#include <uapi/linux/magic.h>
|
||||
|
||||
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
|
||||
MODULE_DESCRIPTION("Filesystem in Userspace");
|
||||
|
@ -50,8 +51,6 @@ MODULE_PARM_DESC(max_user_congthresh,
|
|||
"Global limit for the maximum congestion threshold an "
|
||||
"unprivileged user can set");
|
||||
|
||||
#define FUSE_SUPER_MAGIC 0x65735546
|
||||
|
||||
#define FUSE_DEFAULT_BLKSIZE 512
|
||||
|
||||
/** Maximum number of outstanding background requests */
|
||||
|
|
|
@ -394,9 +394,12 @@ static int fuse_priv_ioctl(struct inode *inode, struct fuse_file *ff,
|
|||
args.out_args[1].value = ptr;
|
||||
|
||||
err = fuse_simple_request(fm, &args);
|
||||
if (!err && outarg.flags & FUSE_IOCTL_RETRY)
|
||||
if (!err) {
|
||||
if (outarg.result < 0)
|
||||
err = outarg.result;
|
||||
else if (outarg.flags & FUSE_IOCTL_RETRY)
|
||||
err = -EIO;
|
||||
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#define EFIVARFS_MAGIC 0xde5e81e4
|
||||
#define HOSTFS_SUPER_MAGIC 0x00c0ffee
|
||||
#define OVERLAYFS_SUPER_MAGIC 0x794c7630
|
||||
#define FUSE_SUPER_MAGIC 0x65735546
|
||||
|
||||
#define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */
|
||||
#define MINIX_SUPER_MAGIC2 0x138F /* minix v1 fs, 30 char names */
|
||||
|
|
Загрузка…
Ссылка в новой задаче