From: Al Viro Date: Mon, 27 Aug 2012 00:36:23 +0000 (-0400) Subject: switch osf_getdirentries() to fget_light() X-Git-Tag: v3.7-rc1~134^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=866ecfdd7cf05680acba635ecf7f30695d8039db;p=profile%2Fivi%2Fkernel-x86-ivi.git switch osf_getdirentries() to fget_light() Signed-off-by: Al Viro --- diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index bc1acdd..d6c49e6 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, 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; }