Commit be847405 authored by Adam Kropelin's avatar Adam Kropelin Committed by Linus Torvalds

[PATCH] contort getdents64 to pacify gcc-2.96

A recent trivial fixup in sys_getdents64 gives gcc-2.96 indigestion in
the form of an ICE.

While upgrading to a sane gcc would be the preferred solution, rewriting
the change as follows eliminates the error for those who cannot do so.
Signed-off-by: default avatarAdam Kropelin <akropel1@rochester.rr.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cb113d2e
......@@ -287,9 +287,10 @@ asmlinkage long sys_getdents64(unsigned int fd, struct linux_dirent64 __user * d
lastdirent = buf.previous;
if (lastdirent) {
typeof(lastdirent->d_off) d_off = file->f_pos;
error = count - buf.count;
if (__put_user(d_off, &lastdirent->d_off))
error = -EFAULT;
if (__put_user(d_off, &lastdirent->d_off))
goto out_putf;
error = count - buf.count;
}
out_putf:
......
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