summaryrefslogtreecommitdiff
path: root/kernel/pid.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-08-13 13:52:30 -0700
committerAndrii Nakryiko <andrii@kernel.org>2024-08-13 13:52:30 -0700
commit50470d3899cdf06fd58def74dec87f31e13cda6f (patch)
tree9d4d04c0c394f079127752d6d5b796aa33b903ca /kernel/pid.c
parent4a4c013d3385b0db85dc361203dc42ff048b6fd6 (diff)
parentde12c3391bce10504c0e7bd767516c74110cfce1 (diff)
Merge remote-tracking branch 'vfs/stable-struct_fd'
Merge Al Viro's struct fd refactorings. Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index da76ed1873f7..2715afb77eab 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -540,13 +540,13 @@ struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags)
struct pid *pid;
f = fdget(fd);
- if (!f.file)
+ if (!fd_file(f))
return ERR_PTR(-EBADF);
- pid = pidfd_pid(f.file);
+ pid = pidfd_pid(fd_file(f));
if (!IS_ERR(pid)) {
get_pid(pid);
- *flags = f.file->f_flags;
+ *flags = fd_file(f)->f_flags;
}
fdput(f);
@@ -755,10 +755,10 @@ SYSCALL_DEFINE3(pidfd_getfd, int, pidfd, int, fd,
return -EINVAL;
f = fdget(pidfd);
- if (!f.file)
+ if (!fd_file(f))
return -EBADF;
- pid = pidfd_pid(f.file);
+ pid = pidfd_pid(fd_file(f));
if (IS_ERR(pid))
ret = PTR_ERR(pid);
else