From: Hugh Dickins <hugh@veritas.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>,
"Eric W. Biederman" <ebiederm@aristanetworks.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH mmotm] mm: page_mkwrite change prototype to match fault: fix sysfs
Date: Sun, 22 Mar 2009 18:36:42 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0903221833140.17976@blonde.anvils> (raw)
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;
next reply other threads:[~2009-03-22 18:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-22 18:36 Hugh Dickins [this message]
2009-03-22 20:40 ` Eric Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0903221833140.17976@blonde.anvils \
--to=hugh@veritas.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@aristanetworks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®