summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/ucma.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-27 12:47:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:10 -0400
commit88b428d6e191affae79b5c1f4764dfdebab9fae6 (patch)
treea59aef2791615ce3093cd200b3fd2c803ff2f441 /drivers/infiniband/core/ucma.c
parent1d3653a79c4eedf5d6eaaa7328b1d134012b2509 (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/ucma.c')
-rw-r--r--drivers/infiniband/core/ucma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index 055ed59838dc..6b2ae729de92 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -1186,13 +1186,13 @@ static ssize_t ucma_migrate_id(struct ucma_file *new_file,
struct ucma_context *ctx;
struct file *filp;
struct ucma_file *cur_file;
- int ret = 0;
+ int ret = 0, fput_needed;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
/* Get current fd to protect against it being closed */
- filp = fget(cmd.fd);
+ filp = fget_light(cmd.fd, &fput_needed);
if (!filp)
return -ENOENT;
@@ -1231,7 +1231,7 @@ response:
ucma_put_ctx(ctx);
file_put:
- fput(filp);
+ fput_light(filp, fput_needed);
return ret;
}