Commit 6777d773a463ac045d333b989d4e44660f8d92ad

Authored by Mimi Zohar
Committed by James Morris
1 parent 3edf2fb9d8

kernel_read: redefine offset type

vfs_read() offset is defined as loff_t, but kernel_read()
offset is only defined as unsigned long. Redefine
kernel_read() offset as loff_t.

Cc: stable@kernel.org
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>

Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff

... ... @@ -678,8 +678,8 @@
678 678 }
679 679 EXPORT_SYMBOL(open_exec);
680 680  
681   -int kernel_read(struct file *file, unsigned long offset,
682   - char *addr, unsigned long count)
  681 +int kernel_read(struct file *file, loff_t offset,
  682 + char *addr, unsigned long count)
683 683 {
684 684 mm_segment_t old_fs;
685 685 loff_t pos = offset;
... ... @@ -2123,7 +2123,7 @@
2123 2123 int open_flag, int mode, int acc_mode);
2124 2124 extern int may_open(struct path *, int, int);
2125 2125  
2126   -extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
  2126 +extern int kernel_read(struct file *, loff_t, char *, unsigned long);
2127 2127 extern struct file * open_exec(const char *);
2128 2128  
2129 2129 /* fs/dcache.c -- generic fs support functions */