Commit 851a039c authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds
Browse files

mm: page_mkwrite change prototype to match fault: fix sysfs

Fix warnings and return values in sysfs bin_page_mkwrite(), fixing
fs/sysfs/bin.c: In function `bin_page_mkwrite':
fs/sysfs/bin.c:250: warning: passing argument 2 of `bb->vm_ops->page_mkwrite' from incompatible pointer type
fs/sysfs/bin.c: At top level:
fs/sysfs/bin.c:280: warning: initialization from incompatible pointer type

Expects to have my [PATCH next] sysfs: fix some bin_vm_ops errors
Signed-off-by: default avatarHugh Dickins <>
Cc: Nick Piggin <>
Cc: "Eric W. Biederman" <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 56a76f82
......@@ -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;
if (!bb->vm_ops->page_mkwrite)
return 0;
if (!sysfs_get_active_two(attr_sd))
return -EINVAL;
ret = bb->vm_ops->page_mkwrite(vma, page);
ret = bb->vm_ops->page_mkwrite(vma, vmf);
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment