switch osf_getdirentries() to fget_light()
[firefly-linux-kernel-4.4.55.git] / arch / alpha / kernel / osf_sys.c
index bc1acdda7a5ed8ab3945b72559c09a9e763ec030..d6c49e67d3fc5b076e7e6eb59decf0a5b6fd51f9 100644 (file)
@@ -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;
 
@@ -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;
 }