Commit ecaa80fb authored by Al Viro's avatar Al Viro

switch hpux_getdents() to fget_light()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7456a29b
...@@ -112,9 +112,9 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i ...@@ -112,9 +112,9 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i
struct file * file; struct file * file;
struct hpux_dirent __user * lastdirent; struct hpux_dirent __user * lastdirent;
struct getdents_callback buf; struct getdents_callback buf;
int error = -EBADF; int error = -EBADF, fput_needed;
file = fget(fd); file = fget_light(fd, &fput_needed);
if (!file) if (!file)
goto out; goto out;
...@@ -134,7 +134,7 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i ...@@ -134,7 +134,7 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i
error = count - buf.count; error = count - buf.count;
} }
fput(file); fput_light(file, fput_needed);
out: out:
return error; return error;
} }
......
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