]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/sysfs/bin.c
Merge branch 'bzip2-lzma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / fs / sysfs / bin.c
index 07703d3ff4a1ebdb8729bfcbfd7d759a7afbc06a..93e0c0281d4511cc1319bcb0fdb2ed05eb1453a4 100644 (file)
@@ -234,7 +234,7 @@ static int bin_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
        return ret;
 }
 
-static int bin_page_mkwrite(struct vm_area_struct *vma, struct page *page)
+static int bin_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
        struct file *file = vma->vm_file;
        struct bin_buffer *bb = file->private_data;
@@ -242,15 +242,15 @@ static int bin_page_mkwrite(struct vm_area_struct *vma, struct page *page)
        int ret;
 
        if (!bb->vm_ops)
-               return -EINVAL;
+               return VM_FAULT_SIGBUS;
 
        if (!bb->vm_ops->page_mkwrite)
                return 0;
 
        if (!sysfs_get_active_two(attr_sd))
-               return -EINVAL;
+               return VM_FAULT_SIGBUS;
 
-       ret = bb->vm_ops->page_mkwrite(vma, page);
+       ret = bb->vm_ops->page_mkwrite(vma, vmf);
 
        sysfs_put_active_two(attr_sd);
        return ret;