new helpers: no_seek_end_llseek{,_size}()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Este commit está contenido en:
Al Viro
2015-12-05 22:04:48 -05:00
padre b808b1d632
commit b25472f9b9
Se han modificado 13 ficheros con 54 adiciones y 222 borrados

Ver fichero

@@ -2825,21 +2825,7 @@ sisusb_lseek(struct file *file, loff_t offset, int orig)
return -ENODEV;
}
switch (orig) {
case 0:
file->f_pos = offset;
ret = file->f_pos;
/* never negative, no force_successful_syscall needed */
break;
case 1:
file->f_pos += offset;
ret = file->f_pos;
/* never negative, no force_successful_syscall needed */
break;
default:
/* seeking relative to "end of file" is not supported */
ret = -EINVAL;
}
ret = no_seek_end_llseek(file, offset, orig);
mutex_unlock(&sisusb->lock);
return ret;