mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
vc: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
747977976b
commit
65004276fc
@ -188,22 +188,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
|
||||
console_unlock();
|
||||
if (size < 0)
|
||||
return size;
|
||||
switch (orig) {
|
||||
default:
|
||||
return -EINVAL;
|
||||
case 2:
|
||||
offset += size;
|
||||
break;
|
||||
case 1:
|
||||
offset += file->f_pos;
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
if (offset < 0 || offset > size) {
|
||||
return -EINVAL;
|
||||
}
|
||||
file->f_pos = offset;
|
||||
return file->f_pos;
|
||||
return fixed_size_llseek(file, offset, orig, size);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user