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
310d9d5a
Commit
310d9d5a
authored
Jun 11, 2022
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expand those iov_iter_advance()...
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
746de1f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
lib/iov_iter.c
lib/iov_iter.c
+9
-2
No files found.
lib/iov_iter.c
View file @
310d9d5a
...
@@ -1378,7 +1378,8 @@ static ssize_t iter_xarray_get_pages(struct iov_iter *i,
...
@@ -1378,7 +1378,8 @@ static ssize_t iter_xarray_get_pages(struct iov_iter *i,
return
0
;
return
0
;
maxsize
=
min_t
(
size_t
,
nr
*
PAGE_SIZE
-
offset
,
maxsize
);
maxsize
=
min_t
(
size_t
,
nr
*
PAGE_SIZE
-
offset
,
maxsize
);
iov_iter_advance
(
i
,
maxsize
);
i
->
iov_offset
+=
maxsize
;
i
->
count
-=
maxsize
;
return
maxsize
;
return
maxsize
;
}
}
...
@@ -1467,7 +1468,13 @@ static ssize_t __iov_iter_get_pages_alloc(struct iov_iter *i,
...
@@ -1467,7 +1468,13 @@ static ssize_t __iov_iter_get_pages_alloc(struct iov_iter *i,
for
(
int
k
=
0
;
k
<
n
;
k
++
)
for
(
int
k
=
0
;
k
<
n
;
k
++
)
get_page
(
p
[
k
]
=
page
+
k
);
get_page
(
p
[
k
]
=
page
+
k
);
maxsize
=
min_t
(
size_t
,
maxsize
,
n
*
PAGE_SIZE
-
*
start
);
maxsize
=
min_t
(
size_t
,
maxsize
,
n
*
PAGE_SIZE
-
*
start
);
iov_iter_advance
(
i
,
maxsize
);
i
->
count
-=
maxsize
;
i
->
iov_offset
+=
maxsize
;
if
(
i
->
iov_offset
==
i
->
bvec
->
bv_len
)
{
i
->
iov_offset
=
0
;
i
->
bvec
++
;
i
->
nr_segs
--
;
}
return
maxsize
;
return
maxsize
;
}
}
if
(
iov_iter_is_pipe
(
i
))
if
(
iov_iter_is_pipe
(
i
))
...
...
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