Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matisse
android_kernel_samsung_matisse
Commits
7a67f63b
Commit
7a67f63b
authored
16 years ago
by
Jens Axboe
Browse files
Options
Download
Email Patches
Plain Diff
block: add bio_has_data() to detect whether a bio carries data or not
Signed-off-by:
Jens Axboe
<
jens.axboe@oracle.com
>
parent
35e396cd
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
include/linux/bio.h
include/linux/bio.h
+8
-0
No files found.
include/linux/bio.h
View file @
7a67f63b
...
...
@@ -445,6 +445,14 @@ static inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
__bio_kmap_irq((bio), (bio)->bi_idx, (flags))
#define bio_kunmap_irq(buf,flags) __bio_kunmap_irq(buf, flags)
/*
* Check whether this bio carries any data or not. A NULL bio is allowed.
*/
static
inline
int
bio_has_data
(
struct
bio
*
bio
)
{
return
bio
&&
bio
->
bi_io_vec
!=
NULL
;
}
#if defined(CONFIG_BLK_DEV_INTEGRITY)
#define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)]))
...
...
This diff is collapsed.
Click to expand it.
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