Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88473
b: refs/heads/master
c: a7dab9e
h: refs/heads/master
i:
  88471: 92c8485
v: v3
  • Loading branch information
Roland Dreier committed Apr 17, 2008
1 parent 44a7791 commit 27b9b71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ae5c187acb67c2929428479c23a79c4288f0c68
refs/heads/master: a7dab9e887ce37391f004ffd6ce0ffed7272fd69
19 changes: 7 additions & 12 deletions trunk/drivers/infiniband/core/uverbs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,23 +517,18 @@ struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
goto err;
}

filp = get_empty_filp();
if (!filp) {
ret = -ENFILE;
goto err_fd;
}

/*
* fops_get() can't fail here, because we're coming from a
* system call on a uverbs file, which will already have a
* module reference.
*/
filp->f_op = fops_get(&uverbs_event_fops);
filp->f_path.mnt = mntget(uverbs_event_mnt);
filp->f_path.dentry = dget(uverbs_event_mnt->mnt_root);
filp->f_mapping = filp->f_path.dentry->d_inode->i_mapping;
filp->f_flags = O_RDONLY;
filp->f_mode = FMODE_READ;
filp = alloc_file(uverbs_event_mnt, dget(uverbs_event_mnt->mnt_root),
FMODE_READ, fops_get(&uverbs_event_fops));
if (!filp) {
ret = -ENFILE;
goto err_fd;
}

filp->private_data = ev_file;

return filp;
Expand Down

0 comments on commit 27b9b71

Please sign in to comment.