Commit 20ba5d736f5a42abbee3e14384ff2d0fdaef2e6d

Authored by Al Viro
1 parent 545ec2c794

switch signalfd4() to fget_light/fput_light

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 1 changed file with 4 additions and 3 deletions Side-by-side Diff

... ... @@ -269,12 +269,13 @@
269 269 if (ufd < 0)
270 270 kfree(ctx);
271 271 } else {
272   - struct file *file = fget(ufd);
  272 + int fput_needed;
  273 + struct file *file = fget_light(ufd, &fput_needed);
273 274 if (!file)
274 275 return -EBADF;
275 276 ctx = file->private_data;
276 277 if (file->f_op != &signalfd_fops) {
277   - fput(file);
  278 + fput_light(file, fput_needed);
278 279 return -EINVAL;
279 280 }
280 281 spin_lock_irq(&current->sighand->siglock);
... ... @@ -282,7 +283,7 @@
282 283 spin_unlock_irq(&current->sighand->siglock);
283 284  
284 285 wake_up(&current->sighand->signalfd_wqh);
285   - fput(file);
  286 + fput_light(file, fput_needed);
286 287 }
287 288  
288 289 return ufd;