> +int hugetlb_zero_setup(struct file *file, struct vm_area_struct *vma)
> +{
> + file = hugetlb_file_setup(vma->vm_end - vma->vm_start, 0);
> + if (IS_ERR(file))
> + return PTR_ERR(file);
> +
> + if (vma->vm_file)
> + fput(vma->vm_file);
> + vma->vm_file = f
add a char device /dev/hugetlb that behaves similar to /dev/zero,
built on top of internal hugetlbfs mount.
Signed-off-by: Ken Chen <[EMAIL PROTECTED]>
diff -u b/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
--- b/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -795,6 +795,23 @@
return
2 matches
Mail list logo