summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-21 18:44:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-29 23:28:30 -0400
commit20ba5d736f5a42abbee3e14384ff2d0fdaef2e6d (patch)
tree7537c1a7c2efd3e145f52a43958c45581b0f4530 /fs
parent545ec2c7945bf7d22d0779e7dc9bf16f7dd9ae34 (diff)
downloadop-kernel-dev-20ba5d736f5a42abbee3e14384ff2d0fdaef2e6d.zip
op-kernel-dev-20ba5d736f5a42abbee3e14384ff2d0fdaef2e6d.tar.gz
switch signalfd4() to fget_light/fput_light
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/signalfd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c
index 7ae2a57..9f35a37 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -269,12 +269,13 @@ SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask,
if (ufd < 0)
kfree(ctx);
} else {
- struct file *file = fget(ufd);
+ int fput_needed;
+ struct file *file = fget_light(ufd, &fput_needed);
if (!file)
return -EBADF;
ctx = file->private_data;
if (file->f_op != &signalfd_fops) {
- fput(file);
+ fput_light(file, fput_needed);
return -EINVAL;
}
spin_lock_irq(&current->sighand->siglock);
@@ -282,7 +283,7 @@ SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask,
spin_unlock_irq(&current->sighand->siglock);
wake_up(&current->sighand->signalfd_wqh);
- fput(file);
+ fput_light(file, fput_needed);
}
return ufd;
OpenPOWER on IntegriCloud