From: Al Viro Date: Mon, 17 Jun 2013 11:31:22 +0000 (+0400) Subject: vc: switch to fixed_size_llseek() X-Git-Tag: accepted/tizen/common/20141203.182822~1960^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65004276fc45a37c133f09a86712e6f2daede342;p=platform%2Fkernel%2Flinux-arm64.git vc: switch to fixed_size_llseek() Signed-off-by: Al Viro --- diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index d7799de..14a2b5f 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c @@ -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); }