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

bfa: switch to fixed_size_llseek()

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

Al Viro c04eba72 eb5881d3

+3 -25
+3 -25
drivers/scsi/bfa/bfad_debugfs.c
··· 173 173 static loff_t 174 174 bfad_debugfs_lseek(struct file *file, loff_t offset, int orig) 175 175 { 176 - struct bfad_debug_info *debug; 177 - loff_t pos = file->f_pos; 178 - 179 - debug = file->private_data; 180 - 181 - switch (orig) { 182 - case 0: 183 - file->f_pos = offset; 184 - break; 185 - case 1: 186 - file->f_pos += offset; 187 - break; 188 - case 2: 189 - file->f_pos = debug->buffer_len + offset; 190 - break; 191 - default: 192 - return -EINVAL; 193 - } 194 - 195 - if (file->f_pos < 0 || file->f_pos > debug->buffer_len) { 196 - file->f_pos = pos; 197 - return -EINVAL; 198 - } 199 - 200 - return file->f_pos; 176 + struct bfad_debug_info *debug = file->private_data; 177 + return fixed_size_llseek(file, offset, orig, 178 + debug->buffer_len); 201 179 } 202 180 203 181 static ssize_t