mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
cgroup_get_from_fd(): switch to fdget_raw()
Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
1d0027dc9a
commit
2f31fa029d
@ -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);
|
||||
fdput(f);
|
||||
return cgrp;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user