Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

proc_powerpc: switch to fixed_size_llseek()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro b33159b7 4a1f2f38

+2 -18
+2 -18
arch/powerpc/kernel/proc_powerpc.c
··· 29 29 30 30 #ifdef CONFIG_PPC64 31 31 32 - static loff_t page_map_seek( struct file *file, loff_t off, int whence) 32 + static loff_t page_map_seek(struct file *file, loff_t off, int whence) 33 33 { 34 - loff_t new; 35 - switch(whence) { 36 - case 0: 37 - new = off; 38 - break; 39 - case 1: 40 - new = file->f_pos + off; 41 - break; 42 - case 2: 43 - new = PAGE_SIZE + off; 44 - break; 45 - default: 46 - return -EINVAL; 47 - } 48 - if ( new < 0 || new > PAGE_SIZE ) 49 - return -EINVAL; 50 - return (file->f_pos = new); 34 + return fixed_size_llseek(file, off, whence, PAGE_SIZE); 51 35 } 52 36 53 37 static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes,