Commit 65004276 authored by Al Viro's avatar Al Viro

vc: switch to fixed_size_llseek()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 74797797
...@@ -188,22 +188,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig) ...@@ -188,22 +188,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
console_unlock(); console_unlock();
if (size < 0) if (size < 0)
return size; return size;
switch (orig) { return fixed_size_llseek(file, offset, orig, size);
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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment