aboutsummaryrefslogtreecommitdiffstats
path: root/fs/eventfd.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-12-23 16:51:33 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-01-25 03:13:04 -0500
commit36a7411724b1caf2fa92b5e4a41576ee8f16769e (patch)
treec31f54f03d05b26e28e1a01a2ed0003a319b2c10 /fs/eventfd.c
parent1c1c8747cd0528fe1d225badf25bf5346d799ea3 (diff)
eventfd_ctx_fdget(): use fdget() instead of fget()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/eventfd.c')
-rw-r--r--fs/eventfd.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/eventfd.c b/fs/eventfd.c
index 35470d9b96e6..d6a88e7812f3 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -349,15 +349,12 @@ EXPORT_SYMBOL_GPL(eventfd_fget);
349 */ 349 */
350struct eventfd_ctx *eventfd_ctx_fdget(int fd) 350struct eventfd_ctx *eventfd_ctx_fdget(int fd)
351{ 351{
352 struct file *file;
353 struct eventfd_ctx *ctx; 352 struct eventfd_ctx *ctx;
354 353 struct fd f = fdget(fd);
355 file = eventfd_fget(fd); 354 if (!f.file)
356 if (IS_ERR(file)) 355 return ERR_PTR(-EBADF);
357 return (struct eventfd_ctx *) file; 356 ctx = eventfd_ctx_fileget(f.file);
358 ctx = eventfd_ctx_get(file->private_data); 357 fdput(f);
359 fput(file);
360
361 return ctx; 358 return ctx;
362} 359}
363EXPORT_SYMBOL_GPL(eventfd_ctx_fdget); 360EXPORT_SYMBOL_GPL(eventfd_ctx_fdget);