* [PATCH mmotm] mm: page_mkwrite change prototype to match fault: fix sysfs
@ 2009-03-22 18:36 Hugh Dickins
2009-03-22 20:40 ` Eric Biederman
0 siblings, 1 reply; 2+ messages in thread
From: Hugh Dickins @ 2009-03-22 18:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: Nick Piggin, Eric W. Biederman, linux-kernel
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
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
To follow mm-page_mkwrite-change-prototype-to-match-fault.patch
Expects to have my [PATCH next] sysfs: fix some bin_vm_ops errors
fs/sysfs/bin.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- next/fs/sysfs/bin.c 2009-03-21 18:01:26.000000000 +0000
+++ mmotm/fs/sysfs/bin.c 2009-03-21 18:28:51.000000000 +0000
@@ -234,7 +234,7 @@ static int bin_fault(struct vm_area_stru
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_ar
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH mmotm] mm: page_mkwrite change prototype to match fault: fix sysfs
2009-03-22 18:36 [PATCH mmotm] mm: page_mkwrite change prototype to match fault: fix sysfs Hugh Dickins
@ 2009-03-22 20:40 ` Eric Biederman
0 siblings, 0 replies; 2+ messages in thread
From: Eric Biederman @ 2009-03-22 20:40 UTC (permalink / raw)
To: Hugh Dickins; +Cc: Andrew Morton, Nick Piggin, linux-kernel
On Sun, Mar 22, 2009 at 11:36 AM, Hugh Dickins <hugh@veritas.com> wrote:
> 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
In general this looks reasonable. It appears that linux-next has
changed the prototype
of page_mkwrite. Which is why I did not see this failure mode.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-22 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-22 18:36 [PATCH mmotm] mm: page_mkwrite change prototype to match fault: fix sysfs Hugh Dickins
2009-03-22 20:40 ` Eric Biederman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®