[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0903221833140.17976@blonde.anvils>
Date: Sun, 22 Mar 2009 18:36:42 +0000 (GMT)
From: Hugh Dickins <hugh@...itas.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Nick Piggin <npiggin@...e.de>,
"Eric W. Biederman" <ebiederm@...stanetworks.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH mmotm] 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
Signed-off-by: Hugh Dickins <hugh@...itas.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists