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
0504c074
Commit
0504c074
authored
Mar 21, 2015
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch {compat_,}do_readv_writev() to {compat_,}import_iovec()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
32a56afa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
fs/read_write.c
fs/read_write.c
+16
-16
No files found.
fs/read_write.c
View file @
0504c074
...
@@ -842,13 +842,14 @@ static ssize_t do_readv_writev(int type, struct file *file,
...
@@ -842,13 +842,14 @@ static ssize_t do_readv_writev(int type, struct file *file,
iov_fn_t
fnv
;
iov_fn_t
fnv
;
iter_fn_t
iter_fn
;
iter_fn_t
iter_fn
;
ret
=
rw_copy_check_uvector
(
type
,
uvector
,
nr_segs
,
ret
=
import_iovec
(
type
,
uvector
,
nr_segs
,
ARRAY_SIZE
(
iovstack
),
iovstack
,
&
iov
);
ARRAY_SIZE
(
iovstack
),
&
iov
,
&
iter
);
if
(
ret
<=
0
)
if
(
ret
<
0
)
goto
out
;
return
ret
;
iov_iter_init
(
&
iter
,
type
,
iov
,
nr_segs
,
ret
);
tot_len
=
ret
;
tot_len
=
iov_iter_count
(
&
iter
);
if
(
!
tot_len
)
goto
out
;
ret
=
rw_verify_area
(
type
,
file
,
pos
,
tot_len
);
ret
=
rw_verify_area
(
type
,
file
,
pos
,
tot_len
);
if
(
ret
<
0
)
if
(
ret
<
0
)
goto
out
;
goto
out
;
...
@@ -876,7 +877,6 @@ static ssize_t do_readv_writev(int type, struct file *file,
...
@@ -876,7 +877,6 @@ static ssize_t do_readv_writev(int type, struct file *file,
file_end_write
(
file
);
file_end_write
(
file
);
out:
out:
if
(
iov
!=
iovstack
)
kfree
(
iov
);
kfree
(
iov
);
if
((
ret
+
(
type
==
READ
))
>
0
)
{
if
((
ret
+
(
type
==
READ
))
>
0
)
{
if
(
type
==
READ
)
if
(
type
==
READ
)
...
@@ -1022,13 +1022,14 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
...
@@ -1022,13 +1022,14 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
iov_fn_t
fnv
;
iov_fn_t
fnv
;
iter_fn_t
iter_fn
;
iter_fn_t
iter_fn
;
ret
=
compat_rw_copy_check_uvector
(
type
,
uvector
,
nr_segs
,
ret
=
compat_import_iovec
(
type
,
uvector
,
nr_segs
,
UIO_FASTIOV
,
iovstack
,
&
iov
);
UIO_FASTIOV
,
&
iov
,
&
iter
);
if
(
ret
<=
0
)
if
(
ret
<
0
)
goto
out
;
return
ret
;
iov_iter_init
(
&
iter
,
type
,
iov
,
nr_segs
,
ret
);
tot_len
=
ret
;
tot_len
=
iov_iter_count
(
&
iter
);
if
(
!
tot_len
)
goto
out
;
ret
=
rw_verify_area
(
type
,
file
,
pos
,
tot_len
);
ret
=
rw_verify_area
(
type
,
file
,
pos
,
tot_len
);
if
(
ret
<
0
)
if
(
ret
<
0
)
goto
out
;
goto
out
;
...
@@ -1056,7 +1057,6 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
...
@@ -1056,7 +1057,6 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
file_end_write
(
file
);
file_end_write
(
file
);
out:
out:
if
(
iov
!=
iovstack
)
kfree
(
iov
);
kfree
(
iov
);
if
((
ret
+
(
type
==
READ
))
>
0
)
{
if
((
ret
+
(
type
==
READ
))
>
0
)
{
if
(
type
==
READ
)
if
(
type
==
READ
)
...
...
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