Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux-guf
Manage
Activity
Members
Labels
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SECO Northern Europe
Kernel
linux-guf
Commits
cfa86a74
Commit
cfa86a74
authored
10 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
cuse: switch to iov_iter
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
39c853eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/fuse/cuse.c
+10
-17
10 additions, 17 deletions
fs/fuse/cuse.c
with
10 additions
and
17 deletions
fs/fuse/cuse.c
+
10
−
17
View file @
cfa86a74
...
@@ -88,32 +88,23 @@ static struct list_head *cuse_conntbl_head(dev_t devt)
...
@@ -88,32 +88,23 @@ static struct list_head *cuse_conntbl_head(dev_t devt)
* FUSE file.
* FUSE file.
*/
*/
static
ssize_t
cuse_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
static
ssize_t
cuse_read_iter
(
struct
kiocb
*
kiocb
,
struct
iov_iter
*
to
)
loff_t
*
ppos
)
{
{
struct
fuse_io_priv
io
=
{
.
async
=
0
,
.
file
=
kiocb
->
ki_filp
};
loff_t
pos
=
0
;
loff_t
pos
=
0
;
struct
iovec
iov
=
{
.
iov_base
=
buf
,
.
iov_len
=
count
};
struct
fuse_io_priv
io
=
{
.
async
=
0
,
.
file
=
file
};
struct
iov_iter
ii
;
iov_iter_init
(
&
ii
,
READ
,
&
iov
,
1
,
count
);
return
fuse_direct_io
(
&
io
,
&
ii
,
&
pos
,
FUSE_DIO_CUSE
);
return
fuse_direct_io
(
&
io
,
to
,
&
pos
,
FUSE_DIO_CUSE
);
}
}
static
ssize_t
cuse_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
static
ssize_t
cuse_write_iter
(
struct
kiocb
*
kiocb
,
struct
iov_iter
*
from
)
size_t
count
,
loff_t
*
ppos
)
{
{
struct
fuse_io_priv
io
=
{
.
async
=
0
,
.
file
=
kiocb
->
ki_filp
};
loff_t
pos
=
0
;
loff_t
pos
=
0
;
struct
iovec
iov
=
{
.
iov_base
=
(
void
__user
*
)
buf
,
.
iov_len
=
count
};
struct
fuse_io_priv
io
=
{
.
async
=
0
,
.
file
=
file
};
struct
iov_iter
ii
;
iov_iter_init
(
&
ii
,
WRITE
,
&
iov
,
1
,
count
);
/*
/*
* No locking or generic_write_checks(), the server is
* No locking or generic_write_checks(), the server is
* responsible for locking and sanity checks.
* responsible for locking and sanity checks.
*/
*/
return
fuse_direct_io
(
&
io
,
&
ii
,
&
pos
,
return
fuse_direct_io
(
&
io
,
from
,
&
pos
,
FUSE_DIO_WRITE
|
FUSE_DIO_CUSE
);
FUSE_DIO_WRITE
|
FUSE_DIO_CUSE
);
}
}
...
@@ -186,8 +177,10 @@ static long cuse_file_compat_ioctl(struct file *file, unsigned int cmd,
...
@@ -186,8 +177,10 @@ static long cuse_file_compat_ioctl(struct file *file, unsigned int cmd,
static
const
struct
file_operations
cuse_frontend_fops
=
{
static
const
struct
file_operations
cuse_frontend_fops
=
{
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
read
=
cuse_read
,
.
read
=
new_sync_read
,
.
write
=
cuse_write
,
.
write
=
new_sync_write
,
.
read_iter
=
cuse_read_iter
,
.
write_iter
=
cuse_write_iter
,
.
open
=
cuse_open
,
.
open
=
cuse_open
,
.
release
=
cuse_release
,
.
release
=
cuse_release
,
.
unlocked_ioctl
=
cuse_file_ioctl
,
.
unlocked_ioctl
=
cuse_file_ioctl
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment