Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
cfa86a74
Commit
cfa86a74
authored
Mar 21, 2015
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cuse: switch to iov_iter
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
39c853eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
fs/fuse/cuse.c
fs/fuse/cuse.c
+10
-17
No files found.
fs/fuse/cuse.c
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment