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
345995fa
Commit
345995fa
authored
Mar 21, 2015
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vmsplice_to_user(): switch to import_iovec()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d4fb392f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
fs/splice.c
fs/splice.c
+11
-16
No files found.
fs/splice.c
View file @
345995fa
...
@@ -1533,34 +1533,29 @@ static long vmsplice_to_user(struct file *file, const struct iovec __user *uiov,
...
@@ -1533,34 +1533,29 @@ static long vmsplice_to_user(struct file *file, const struct iovec __user *uiov,
struct
iovec
iovstack
[
UIO_FASTIOV
];
struct
iovec
iovstack
[
UIO_FASTIOV
];
struct
iovec
*
iov
=
iovstack
;
struct
iovec
*
iov
=
iovstack
;
struct
iov_iter
iter
;
struct
iov_iter
iter
;
ssize_t
count
;
pipe
=
get_pipe_info
(
file
);
pipe
=
get_pipe_info
(
file
);
if
(
!
pipe
)
if
(
!
pipe
)
return
-
EBADF
;
return
-
EBADF
;
ret
=
rw_copy_check_uvector
(
READ
,
uiov
,
nr_segs
,
ret
=
import_iovec
(
READ
,
uiov
,
nr_segs
,
ARRAY_SIZE
(
iovstack
),
iovstack
,
&
iov
);
ARRAY_SIZE
(
iovstack
),
&
iov
,
&
iter
);
if
(
ret
<=
0
)
if
(
ret
<
0
)
goto
out
;
return
ret
;
count
=
ret
;
iov_iter_init
(
&
iter
,
READ
,
iov
,
nr_segs
,
count
);
sd
.
total_len
=
iov_iter_count
(
&
iter
);
sd
.
len
=
0
;
sd
.
len
=
0
;
sd
.
total_len
=
count
;
sd
.
flags
=
flags
;
sd
.
flags
=
flags
;
sd
.
u
.
data
=
&
iter
;
sd
.
u
.
data
=
&
iter
;
sd
.
pos
=
0
;
sd
.
pos
=
0
;
pipe_lock
(
pipe
);
if
(
sd
.
total_len
)
{
ret
=
__splice_from_pipe
(
pipe
,
&
sd
,
pipe_to_user
);
pipe_lock
(
pipe
);
pipe_unlock
(
pipe
);
ret
=
__splice_from_pipe
(
pipe
,
&
sd
,
pipe_to_user
);
pipe_unlock
(
pipe
);
out:
}
if
(
iov
!=
iovstack
)
kfree
(
iov
);
kfree
(
iov
);
return
ret
;
return
ret
;
}
}
...
...
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