switch simple cases of fget_light to fdget
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cette révision appartient à :
@@ -269,13 +269,12 @@ SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask,
|
||||
if (ufd < 0)
|
||||
kfree(ctx);
|
||||
} else {
|
||||
int fput_needed;
|
||||
struct file *file = fget_light(ufd, &fput_needed);
|
||||
if (!file)
|
||||
struct fd f = fdget(ufd);
|
||||
if (!f.file)
|
||||
return -EBADF;
|
||||
ctx = file->private_data;
|
||||
if (file->f_op != &signalfd_fops) {
|
||||
fput_light(file, fput_needed);
|
||||
ctx = f.file->private_data;
|
||||
if (f.file->f_op != &signalfd_fops) {
|
||||
fdput(f);
|
||||
return -EINVAL;
|
||||
}
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
@@ -283,7 +282,7 @@ SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask,
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
|
||||
wake_up(¤t->sighand->signalfd_wqh);
|
||||
fput_light(file, fput_needed);
|
||||
fdput(f);
|
||||
}
|
||||
|
||||
return ufd;
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur