projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d0027d
)
cgroup_get_from_fd(): switch to fdget_raw()
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 21 Aug 2022 16:01:26 +0000
(12:01 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 21 Apr 2023 02:55:35 +0000
(22:55 -0400)
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/cgroup/cgroup.c
patch
|
blob
|
history
diff --git
a/kernel/cgroup/cgroup.c
b/kernel/cgroup/cgroup.c
index
935e812
..
4b249f8
100644
(file)
--- a/
kernel/cgroup/cgroup.c
+++ b/
kernel/cgroup/cgroup.c
@@
-6856,14
+6856,12
@@
EXPORT_SYMBOL_GPL(cgroup_get_from_path);
struct cgroup *cgroup_v1v2_get_from_fd(int fd)
{
struct cgroup *cgrp;
- struct file *f;
-
- f = fget_raw(fd);
- if (!f)
+ struct fd f = fdget_raw(fd);
+ if (!f.file)
return ERR_PTR(-EBADF);
- cgrp = cgroup_v1v2_get_from_file(f);
- fput(f);
+ cgrp = cgroup_v1v2_get_from_file(f
.file
);
+ f
d
put(f);
return cgrp;
}