switch simple cases of fget_light to fdget

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cette révision appartient à :
Al Viro
2012-08-28 12:52:22 -04:00
Parent a5b470ba06
révision 2903ff019b
44 fichiers modifiés avec 631 ajouts et 761 suppressions

Voir le fichier

@@ -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(&current->sighand->siglock);
@@ -283,7 +282,7 @@ SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask,
spin_unlock_irq(&current->sighand->siglock);
wake_up(&current->sighand->signalfd_wqh);
fput_light(file, fput_needed);
fdput(f);
}
return ufd;