Commit c6ee465a authored by Prasanna Meda's avatar Prasanna Meda Committed by Linus Torvalds

[PATCH] readdir: return value missed in getdents64

Small issue: return value missed in getdents64, but handled in getdents.
Signed-Off-by: default avatarPrasanna Meda <pmeda@akamai.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b2abed6a
......@@ -287,8 +287,9 @@ 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;
__put_user(d_off, &lastdirent->d_off);
error = count - buf.count;
if (__put_user(d_off, &lastdirent->d_off))
error = -EFAULT;
}
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