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
nexedi
linux
Commits
df889b36
Commit
df889b36
authored
May 02, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-linus' into work.lookups
parents
ce8644fc
10c64cea
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
55 deletions
+35
-55
block/blk-map.c
block/blk-map.c
+8
-39
fs/namei.c
fs/namei.c
+4
-16
fs/splice.c
fs/splice.c
+3
-0
include/linux/uio.h
include/linux/uio.h
+1
-0
lib/iov_iter.c
lib/iov_iter.c
+19
-0
No files found.
block/blk-map.c
View file @
df889b36
...
...
@@ -9,24 +9,6 @@
#include "blk.h"
static
bool
iovec_gap_to_prv
(
struct
request_queue
*
q
,
struct
iovec
*
prv
,
struct
iovec
*
cur
)
{
unsigned
long
prev_end
;
if
(
!
queue_virt_boundary
(
q
))
return
false
;
if
(
prv
->
iov_base
==
NULL
&&
prv
->
iov_len
==
0
)
/* prv is not set - don't check */
return
false
;
prev_end
=
(
unsigned
long
)(
prv
->
iov_base
+
prv
->
iov_len
);
return
(((
unsigned
long
)
cur
->
iov_base
&
queue_virt_boundary
(
q
))
||
prev_end
&
queue_virt_boundary
(
q
));
}
int
blk_rq_append_bio
(
struct
request_queue
*
q
,
struct
request
*
rq
,
struct
bio
*
bio
)
{
...
...
@@ -125,31 +107,18 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
struct
rq_map_data
*
map_data
,
const
struct
iov_iter
*
iter
,
gfp_t
gfp_mask
)
{
struct
iovec
iov
,
prv
=
{.
iov_base
=
NULL
,
.
iov_len
=
0
}
;
bool
copy
=
(
q
->
dma_pad_mask
&
iter
->
count
)
||
map_data
;
bool
copy
=
false
;
unsigned
long
align
=
q
->
dma_pad_mask
|
queue_dma_alignment
(
q
)
;
struct
bio
*
bio
=
NULL
;
struct
iov_iter
i
;
int
ret
;
if
(
!
iter
||
!
iter
->
count
)
return
-
EINVAL
;
iov_for_each
(
iov
,
i
,
*
iter
)
{
unsigned
long
uaddr
=
(
unsigned
long
)
iov
.
iov_base
;
if
(
!
iov
.
iov_len
)
return
-
EINVAL
;
/*
* Keep going so we check length of all segments
*/
if
((
uaddr
&
queue_dma_alignment
(
q
))
||
iovec_gap_to_prv
(
q
,
&
prv
,
&
iov
))
copy
=
true
;
prv
.
iov_base
=
iov
.
iov_base
;
prv
.
iov_len
=
iov
.
iov_len
;
}
if
(
map_data
)
copy
=
true
;
else
if
(
iov_iter_alignment
(
iter
)
&
align
)
copy
=
true
;
else
if
(
queue_virt_boundary
(
q
))
copy
=
queue_virt_boundary
(
q
)
&
iov_iter_gap_alignment
(
iter
);
i
=
*
iter
;
do
{
...
...
fs/namei.c
View file @
df889b36
...
...
@@ -2946,22 +2946,10 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
dentry
=
lookup_real
(
dir
,
dentry
,
nd
->
flags
);
if
(
IS_ERR
(
dentry
))
return
PTR_ERR
(
dentry
);
if
(
create_error
)
{
int
open_flag
=
op
->
open_flag
;
error
=
create_error
;
if
((
open_flag
&
O_EXCL
))
{
if
(
!
dentry
->
d_inode
)
goto
out
;
}
else
if
(
!
dentry
->
d_inode
)
{
goto
out
;
}
else
if
((
open_flag
&
O_TRUNC
)
&&
d_is_reg
(
dentry
))
{
goto
out
;
}
/* will fail later, go on to get the right error */
}
}
if
(
create_error
&&
!
dentry
->
d_inode
)
{
error
=
create_error
;
goto
out
;
}
looked_up:
path
->
dentry
=
dentry
;
...
...
fs/splice.c
View file @
df889b36
...
...
@@ -1143,6 +1143,9 @@ static long do_splice_to(struct file *in, loff_t *ppos,
if
(
unlikely
(
ret
<
0
))
return
ret
;
if
(
unlikely
(
len
>
MAX_RW_COUNT
))
len
=
MAX_RW_COUNT
;
if
(
in
->
f_op
->
splice_read
)
splice_read
=
in
->
f_op
->
splice_read
;
else
...
...
include/linux/uio.h
View file @
df889b36
...
...
@@ -87,6 +87,7 @@ size_t copy_from_iter(void *addr, size_t bytes, struct iov_iter *i);
size_t
copy_from_iter_nocache
(
void
*
addr
,
size_t
bytes
,
struct
iov_iter
*
i
);
size_t
iov_iter_zero
(
size_t
bytes
,
struct
iov_iter
*
);
unsigned
long
iov_iter_alignment
(
const
struct
iov_iter
*
i
);
unsigned
long
iov_iter_gap_alignment
(
const
struct
iov_iter
*
i
);
void
iov_iter_init
(
struct
iov_iter
*
i
,
int
direction
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
size_t
count
);
void
iov_iter_kvec
(
struct
iov_iter
*
i
,
int
direction
,
const
struct
kvec
*
kvec
,
...
...
lib/iov_iter.c
View file @
df889b36
...
...
@@ -569,6 +569,25 @@ unsigned long iov_iter_alignment(const struct iov_iter *i)
}
EXPORT_SYMBOL
(
iov_iter_alignment
);
unsigned
long
iov_iter_gap_alignment
(
const
struct
iov_iter
*
i
)
{
unsigned
long
res
=
0
;
size_t
size
=
i
->
count
;
if
(
!
size
)
return
0
;
iterate_all_kinds
(
i
,
size
,
v
,
(
res
|=
(
!
res
?
0
:
(
unsigned
long
)
v
.
iov_base
)
|
(
size
!=
v
.
iov_len
?
size
:
0
),
0
),
(
res
|=
(
!
res
?
0
:
(
unsigned
long
)
v
.
bv_offset
)
|
(
size
!=
v
.
bv_len
?
size
:
0
)),
(
res
|=
(
!
res
?
0
:
(
unsigned
long
)
v
.
iov_base
)
|
(
size
!=
v
.
iov_len
?
size
:
0
))
);
return
res
;
}
EXPORT_SYMBOL
(
iov_iter_gap_alignment
);
ssize_t
iov_iter_get_pages
(
struct
iov_iter
*
i
,
struct
page
**
pages
,
size_t
maxsize
,
unsigned
maxpages
,
size_t
*
start
)
...
...
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