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
a9c701e5
Commit
a9c701e5
authored
Aug 08, 2008
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block: use bio_has_data() to check for data carrying bio
Signed-off-by:
Jens Axboe
<
jens.axboe@oracle.com
>
parent
7a67f63b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
block/blk-core.c
block/blk-core.c
+1
-4
include/linux/bio.h
include/linux/bio.h
+1
-1
No files found.
block/blk-core.c
View file @
a9c701e5
...
...
@@ -1490,10 +1490,7 @@ void submit_bio(int rw, struct bio *bio)
* If it's a regular read/write or a barrier with data attached,
* go through the normal accounting stuff before submission.
*/
if
(
!
bio_empty_barrier
(
bio
))
{
BIO_BUG_ON
(
!
bio
->
bi_size
);
BIO_BUG_ON
(
!
bio
->
bi_io_vec
);
if
(
bio_has_data
(
bio
))
{
if
(
rw
&
WRITE
)
{
count_vm_events
(
PGPGOUT
,
count
);
...
...
include/linux/bio.h
View file @
a9c701e5
...
...
@@ -185,7 +185,7 @@ struct bio {
#define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST))
#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
#define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META))
#define bio_empty_barrier(bio) (bio_barrier(bio) && !
(bio)->bi_size
)
#define bio_empty_barrier(bio) (bio_barrier(bio) && !
bio_has_data(bio)
)
static
inline
unsigned
int
bio_cur_sectors
(
struct
bio
*
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