diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-01 22:17:41 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-01 22:17:41 -0400 |
commit | c4361bb64b81f5b81a7a08d58654493385a2f2b2 (patch) | |
tree | 8741c0b60ddfbc3fc4e17c8d200f6aa6ff32cca0 /fs/sysfs/bin.c | |
parent | 46368fa05164e1afdc1401294908cf30c6d8d981 (diff) | |
parent | 833bb3046b6cb320e775ea2160ddca87d53260d5 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/sysfs/bin.c')
-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 07703d3ff4a..93e0c0281d4 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; |