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
cffe78d9
Commit
cffe78d9
authored
Aug 30, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm eventfd: switch to fdget
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
70abaded
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
virt/kvm/eventfd.c
virt/kvm/eventfd.c
+10
-10
No files found.
virt/kvm/eventfd.c
View file @
cffe78d9
...
...
@@ -291,7 +291,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
{
struct
kvm_irq_routing_table
*
irq_rt
;
struct
_irqfd
*
irqfd
,
*
tmp
;
struct
f
ile
*
file
=
NULL
;
struct
f
d
f
;
struct
eventfd_ctx
*
eventfd
=
NULL
,
*
resamplefd
=
NULL
;
int
ret
;
unsigned
int
events
;
...
...
@@ -306,13 +306,13 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
INIT_WORK
(
&
irqfd
->
inject
,
irqfd_inject
);
INIT_WORK
(
&
irqfd
->
shutdown
,
irqfd_shutdown
);
f
ile
=
eventfd_f
get
(
args
->
fd
);
if
(
IS_ERR
(
file
)
)
{
ret
=
PTR_ERR
(
file
)
;
goto
fail
;
f
=
fd
get
(
args
->
fd
);
if
(
!
f
.
file
)
{
ret
=
-
EBADF
;
goto
out
;
}
eventfd
=
eventfd_ctx_fileget
(
file
);
eventfd
=
eventfd_ctx_fileget
(
f
.
f
ile
);
if
(
IS_ERR
(
eventfd
))
{
ret
=
PTR_ERR
(
eventfd
);
goto
fail
;
...
...
@@ -391,7 +391,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
lockdep_is_held
(
&
kvm
->
irqfds
.
lock
));
irqfd_update
(
kvm
,
irqfd
,
irq_rt
);
events
=
f
ile
->
f_op
->
poll
(
file
,
&
irqfd
->
pt
);
events
=
f
.
file
->
f_op
->
poll
(
f
.
file
,
&
irqfd
->
pt
);
list_add_tail
(
&
irqfd
->
list
,
&
kvm
->
irqfds
.
items
);
...
...
@@ -408,7 +408,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
* do not drop the file until the irqfd is fully initialized, otherwise
* we might race against the POLLHUP
*/
f
put
(
file
);
f
dput
(
f
);
return
0
;
...
...
@@ -422,9 +422,9 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
if
(
eventfd
&&
!
IS_ERR
(
eventfd
))
eventfd_ctx_put
(
eventfd
);
if
(
!
IS_ERR
(
file
))
fput
(
file
);
fdput
(
f
);
out:
kfree
(
irqfd
);
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