diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-27 12:47:29 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:10 -0400 |
commit | 88b428d6e191affae79b5c1f4764dfdebab9fae6 (patch) | |
tree | a59aef2791615ce3093cd200b3fd2c803ff2f441 /drivers/infiniband/core/uverbs_main.c | |
parent | 1d3653a79c4eedf5d6eaaa7328b1d134012b2509 (diff) |
switch infinibarf users of fget() to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/infiniband/core/uverbs_main.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 604556d73d25..acf75c2cf7ef 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -542,8 +542,9 @@ struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd) | |||
542 | { | 542 | { |
543 | struct ib_uverbs_event_file *ev_file = NULL; | 543 | struct ib_uverbs_event_file *ev_file = NULL; |
544 | struct file *filp; | 544 | struct file *filp; |
545 | int fput_needed; | ||
545 | 546 | ||
546 | filp = fget(fd); | 547 | filp = fget_light(fd, &fput_needed); |
547 | if (!filp) | 548 | if (!filp) |
548 | return NULL; | 549 | return NULL; |
549 | 550 | ||
@@ -559,7 +560,7 @@ struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd) | |||
559 | kref_get(&ev_file->ref); | 560 | kref_get(&ev_file->ref); |
560 | 561 | ||
561 | out: | 562 | out: |
562 | fput(filp); | 563 | fput_light(filp, fput_needed); |
563 | return ev_file; | 564 | return ev_file; |
564 | } | 565 | } |
565 | 566 | ||