diff options
author | Hugh Dickins <hugh@veritas.com> | 2009-03-31 18:23:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:14 -0400 |
commit | 851a039cc547b33b8139fe6d7c2bbfb158e2724e (patch) | |
tree | 0deabfe04b648d7542de8dd36dcd384d03fe09f6 /fs/sysfs | |
parent | 56a76f8275c379ed73c8a43cfa1dfa2f5e9cfa19 (diff) |
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: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: "Eric W. Biederman" <ebiederm@aristanetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/bin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c index 07703d3ff4a1..93e0c0281d45 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c | |||
@@ -234,7 +234,7 @@ static int bin_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
234 | return ret; | 234 | return ret; |
235 | } | 235 | } |
236 | 236 | ||
237 | static int bin_page_mkwrite(struct vm_area_struct *vma, struct page *page) | 237 | static int bin_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
238 | { | 238 | { |
239 | struct file *file = vma->vm_file; | 239 | struct file *file = vma->vm_file; |
240 | struct bin_buffer *bb = file->private_data; | 240 | struct bin_buffer *bb = file->private_data; |
@@ -242,15 +242,15 @@ static int bin_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
242 | int ret; | 242 | int ret; |
243 | 243 | ||
244 | if (!bb->vm_ops) | 244 | if (!bb->vm_ops) |
245 | return -EINVAL; | 245 | return VM_FAULT_SIGBUS; |
246 | 246 | ||
247 | if (!bb->vm_ops->page_mkwrite) | 247 | if (!bb->vm_ops->page_mkwrite) |
248 | return 0; | 248 | return 0; |
249 | 249 | ||
250 | if (!sysfs_get_active_two(attr_sd)) | 250 | if (!sysfs_get_active_two(attr_sd)) |
251 | return -EINVAL; | 251 | return VM_FAULT_SIGBUS; |
252 | 252 | ||
253 | ret = bb->vm_ops->page_mkwrite(vma, page); | 253 | ret = bb->vm_ops->page_mkwrite(vma, vmf); |
254 | 254 | ||
255 | sysfs_put_active_two(attr_sd); | 255 | sysfs_put_active_two(attr_sd); |
256 | return ret; | 256 | return ret; |