Skip to content

Commit 6500427

Browse files
author
Al Viro
committed
vc: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 7479779 commit 6500427

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

‎drivers/tty/vt/vc_screen.c‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
188188
console_unlock();
189189
if (size < 0)
190190
return size;
191-
switch (orig) {
192-
default:
193-
return -EINVAL;
194-
case 2:
195-
offset += size;
196-
break;
197-
case 1:
198-
offset += file->f_pos;
199-
case 0:
200-
break;
201-
}
202-
if (offset < 0 || offset > size) {
203-
return -EINVAL;
204-
}
205-
file->f_pos = offset;
206-
return file->f_pos;
191+
return fixed_size_llseek(file, offset, orig, size);
207192
}
208193

209194

0 commit comments

Comments
 (0)