Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
1d3653a7
Commit
1d3653a7
authored
Aug 27, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch vfio_group_set_container() to fget_light()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
8319aa91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
drivers/vfio/vfio.c
drivers/vfio/vfio.c
+4
-4
No files found.
drivers/vfio/vfio.c
View file @
1d3653a7
...
...
@@ -1017,18 +1017,18 @@ static int vfio_group_set_container(struct vfio_group *group, int container_fd)
struct
file
*
filep
;
struct
vfio_container
*
container
;
struct
vfio_iommu_driver
*
driver
;
int
ret
=
0
;
int
ret
=
0
,
fput_needed
;
if
(
atomic_read
(
&
group
->
container_users
))
return
-
EINVAL
;
filep
=
fget
(
container_f
d
);
filep
=
fget
_light
(
container_fd
,
&
fput_neede
d
);
if
(
!
filep
)
return
-
EBADF
;
/* Sanity check, is this really our fd? */
if
(
filep
->
f_op
!=
&
vfio_fops
)
{
fput
(
filep
);
fput
_light
(
filep
,
fput_needed
);
return
-
EINVAL
;
}
...
...
@@ -1054,7 +1054,7 @@ static int vfio_group_set_container(struct vfio_group *group, int container_fd)
unlock_out:
mutex_unlock
(
&
container
->
group_lock
);
fput
(
filep
);
fput
_light
(
filep
,
fput_needed
);
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment