diff options
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index bc1acdda7a5e..d6c49e67d3fc 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -144,12 +144,12 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd, | |||
144 | struct osf_dirent __user *, dirent, unsigned int, count, | 144 | struct osf_dirent __user *, dirent, unsigned int, count, |
145 | long __user *, basep) | 145 | long __user *, basep) |
146 | { | 146 | { |
147 | int error; | 147 | int error, fput_needed; |
148 | struct file *file; | 148 | struct file *file; |
149 | struct osf_dirent_callback buf; | 149 | struct osf_dirent_callback buf; |
150 | 150 | ||
151 | error = -EBADF; | 151 | error = -EBADF; |
152 | file = fget(fd); | 152 | file = fget_light(fd, &fput_needed); |
153 | if (!file) | 153 | if (!file) |
154 | goto out; | 154 | goto out; |
155 | 155 | ||
@@ -164,7 +164,7 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd, | |||
164 | if (count != buf.count) | 164 | if (count != buf.count) |
165 | error = count - buf.count; | 165 | error = count - buf.count; |
166 | 166 | ||
167 | fput(file); | 167 | fput_light(file, fput_needed); |
168 | out: | 168 | out: |
169 | return error; | 169 | return error; |
170 | } | 170 | } |