X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=fs%2Fcompat.c;fp=fs%2Fcompat.c;h=69ca1e301766e0f91607b3851f8932d32c98568f;hb=bb6f619b3a49f940d7478112500da312d70866eb;hp=2279b59e81f2172efe48f3034dc5e6dbd4e23f12;hpb=5c0ba4e0762e6dabd14a5c276652e2defec38de7;p=cascardo%2Flinux.git diff --git a/fs/compat.c b/fs/compat.c index 2279b59e81f2..69ca1e301766 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -975,7 +975,7 @@ asmlinkage long compat_sys_getdents(unsigned int fd, error = buf.error; lastdirent = buf.previous; if (lastdirent) { - if (put_user(f.file->f_pos, &lastdirent->d_off)) + if (put_user(buf.ctx.pos, &lastdirent->d_off)) error = -EFAULT; else error = count - buf.count; @@ -1062,7 +1062,7 @@ asmlinkage long compat_sys_getdents64(unsigned int fd, error = buf.error; lastdirent = buf.previous; if (lastdirent) { - typeof(lastdirent->d_off) d_off = f.file->f_pos; + typeof(lastdirent->d_off) d_off = buf.ctx.pos; if (__put_user_unaligned(d_off, &lastdirent->d_off)) error = -EFAULT; else