give readdir(2)/getdents(2)/etc. uniform exclusion with lseek()
same as read() on regular files has, and for the same reason. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -147,7 +147,7 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd,
|
||||
long __user *, basep)
|
||||
{
|
||||
int error;
|
||||
struct fd arg = fdget(fd);
|
||||
struct fd arg = fdget_pos(fd);
|
||||
struct osf_dirent_callback buf = {
|
||||
.ctx.actor = osf_filldir,
|
||||
.dirent = dirent,
|
||||
@@ -164,7 +164,7 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd,
|
||||
if (count != buf.count)
|
||||
error = count - buf.count;
|
||||
|
||||
fdput(arg);
|
||||
fdput_pos(arg);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user