Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
struct osf_dirent __user *, dirent, unsigned int, count,
long __user *, basep)
{
struct osf_dirent __user *, dirent, unsigned int, count,
long __user *, basep)
{
+ int error, fput_needed;
struct file *file;
struct osf_dirent_callback buf;
error = -EBADF;
struct file *file;
struct osf_dirent_callback buf;
error = -EBADF;
+ file = fget_light(fd, &fput_needed);
if (count != buf.count)
error = count - buf.count;
if (count != buf.count)
error = count - buf.count;
+ fput_light(file, fput_needed);