Re: [patch 2/2] hugetlb: add /dev/hugetlb char device

2007-03-23 Thread Christoph Hellwig
> +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

[patch 2/2] hugetlb: add /dev/hugetlb char device

2007-03-23 Thread Ken Chen
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