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
faea1329
Commit
faea1329
authored
Sep 24, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kill iov_shorten()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
0e5b935d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
23 deletions
+0
-23
fs/read_write.c
fs/read_write.c
+0
-21
include/linux/uio.h
include/linux/uio.h
+0
-2
No files found.
fs/read_write.c
View file @
faea1329
...
...
@@ -634,27 +634,6 @@ SYSCALL_DEFINE4(pwrite64, unsigned int, fd, const char __user *, buf,
return
ret
;
}
/*
* Reduce an iovec's length in-place. Return the resulting number of segments
*/
unsigned
long
iov_shorten
(
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
size_t
to
)
{
unsigned
long
seg
=
0
;
size_t
len
=
0
;
while
(
seg
<
nr_segs
)
{
seg
++
;
if
(
len
+
iov
->
iov_len
>=
to
)
{
iov
->
iov_len
=
to
-
len
;
break
;
}
len
+=
iov
->
iov_len
;
iov
++
;
}
return
seg
;
}
EXPORT_SYMBOL
(
iov_shorten
);
static
ssize_t
do_iter_readv_writev
(
struct
file
*
filp
,
struct
iov_iter
*
iter
,
loff_t
*
ppos
,
int
type
,
rwf_t
flags
)
{
...
...
include/linux/uio.h
View file @
faea1329
...
...
@@ -80,8 +80,6 @@ static inline struct iovec iov_iter_iovec(const struct iov_iter *iter)
((iov = iov_iter_iovec(&(iter))), 1); \
iov_iter_advance(&(iter), (iov).iov_len))
unsigned
long
iov_shorten
(
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
size_t
to
);
size_t
iov_iter_copy_from_user_atomic
(
struct
page
*
page
,
struct
iov_iter
*
i
,
unsigned
long
offset
,
size_t
bytes
);
void
iov_iter_advance
(
struct
iov_iter
*
i
,
size_t
bytes
);
...
...
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