diff options
Diffstat (limited to 'tools/testing/vma/include/dup.h')
| -rw-r--r-- | tools/testing/vma/include/dup.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/vma/include/dup.h b/tools/testing/vma/include/dup.h index 57046d8ac81d..0d1a2ac88922 100644 --- a/tools/testing/vma/include/dup.h +++ b/tools/testing/vma/include/dup.h @@ -1641,3 +1641,10 @@ static inline pgoff_t linear_anon_page_index(const struct vm_area_struct *vma, return pgoff; } + +extern const struct file_operations zero_fops; + +static inline bool file_is_dev_zero(const struct file *file) +{ + return file && file->f_op == &zero_fops; +} |
