Skip to content

Commit

Permalink
switch osf_getdirentries() to fget_light()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 132ea24 commit 866ecfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/alpha/kernel/osf_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd,
struct osf_dirent __user *, dirent, unsigned int, count,
long __user *, basep)
{
int error;
int error, fput_needed;
struct file *file;
struct osf_dirent_callback buf;

error = -EBADF;
file = fget(fd);
file = fget_light(fd, &fput_needed);
if (!file)
goto out;

Expand All @@ -164,7 +164,7 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd,
if (count != buf.count)
error = count - buf.count;

fput(file);
fput_light(file, fput_needed);
out:
return error;
}
Expand Down

0 comments on commit 866ecfd

Please sign in to comment.