diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-01-29 01:41:54 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-01-29 01:41:54 +0000 |
commit | f969d69ba9f952e5bdd38278e25e26a3e4a61a70 (patch) | |
tree | b3530d803df59d726afaabebc6626987dee1ca05 /fs/read_write.c | |
parent | a10ce7ef2066b455d69187643ddf2073bfc4db24 (diff) |
Merge with 2.3.27.
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | fs/read_write.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 81f6d1141..eb729a4fd 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -63,8 +63,12 @@ asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin) !(inode = dentry->d_inode)) goto out_putf; retval = -EINVAL; - if (origin <= 2) - retval = llseek(file, offset, origin); + if (origin <= 2) { + loff_t res = llseek(file, offset, origin); + retval = res; + if (res != (loff_t)retval) + retval = -EOVERFLOW; /* LFS: should only happen on 32 bit platforms */ + } out_putf: fput(file); bad: |