Skip to content

Commit 2f31fa0

Browse files
author
Al Viro
committed
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>
1 parent 1d0027d commit 2f31fa0

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

kernel/cgroup/cgroup.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6856,14 +6856,12 @@ EXPORT_SYMBOL_GPL(cgroup_get_from_path);
68566856
struct cgroup *cgroup_v1v2_get_from_fd(int fd)
68576857
{
68586858
struct cgroup *cgrp;
6859-
struct file *f;
6860-
6861-
f = fget_raw(fd);
6862-
if (!f)
6859+
struct fd f = fdget_raw(fd);
6860+
if (!f.file)
68636861
return ERR_PTR(-EBADF);
68646862

6865-
cgrp = cgroup_v1v2_get_from_file(f);
6866-
fput(f);
6863+
cgrp = cgroup_v1v2_get_from_file(f.file);
6864+
fdput(f);
68676865
return cgrp;
68686866
}
68696867

0 commit comments

Comments
 (0)