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
b823825e
Commit
b823825e
authored
Jun 20, 2005
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Keep the bio end_io parts inside of bio.c for blk_rq_map_kern()
Signed-off-by:
Jens Axboe
<
axboe@suse.de
>
parent
df46b9a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
drivers/block/ll_rw_blk.c
drivers/block/ll_rw_blk.c
+0
-11
fs/bio.c
fs/bio.c
+11
-0
No files found.
drivers/block/ll_rw_blk.c
View file @
b823825e
...
...
@@ -2177,16 +2177,6 @@ int blk_rq_unmap_user(struct request *rq, struct bio *bio, unsigned int ulen)
EXPORT_SYMBOL
(
blk_rq_unmap_user
);
static
int
blk_rq_map_kern_endio
(
struct
bio
*
bio
,
unsigned
int
bytes_done
,
int
error
)
{
if
(
bio
->
bi_size
)
return
1
;
bio_put
(
bio
);
return
0
;
}
/**
* blk_rq_map_kern - map kernel data to a request, for REQ_BLOCK_PC usage
* @q: request queue where request should be inserted
...
...
@@ -2213,7 +2203,6 @@ struct request *blk_rq_map_kern(request_queue_t *q, int rw, void *kbuf,
if
(
!
IS_ERR
(
bio
))
{
if
(
rw
)
bio
->
bi_rw
|=
(
1
<<
BIO_RW
);
bio
->
bi_end_io
=
blk_rq_map_kern_endio
;
rq
->
bio
=
rq
->
biotail
=
bio
;
blk_rq_bio_prep
(
q
,
rq
,
bio
);
...
...
fs/bio.c
View file @
b823825e
...
...
@@ -701,6 +701,16 @@ void bio_unmap_user(struct bio *bio)
bio_put
(
bio
);
}
static
int
bio_map_kern_endio
(
struct
bio
*
bio
,
unsigned
int
bytes_done
,
int
err
)
{
if
(
bio
->
bi_size
)
return
1
;
bio_put
(
bio
);
return
0
;
}
static
struct
bio
*
__bio_map_kern
(
request_queue_t
*
q
,
void
*
data
,
unsigned
int
len
,
unsigned
int
gfp_mask
)
{
...
...
@@ -734,6 +744,7 @@ static struct bio *__bio_map_kern(request_queue_t *q, void *data,
offset
=
0
;
}
bio
->
bi_end_io
=
bio_map_kern_endio
;
return
bio
;
}
...
...
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