History

pidfs: move setting flags into pidfs_alloc_file()

Instead od adding it into __pidfd_prepare() place it where the actual file allocation happens and update the outdated comment.

Christian Brauner committed 1 year ago

Commit 3155a191 parent b573bf62 files · +4 −5Browse files

Showing the changes to kernel/fork.c (1 of 2 files). Show all

Unified · Split

kernel/fork.c+0−5
@@ -2042,11 +2042,6 @@ static int __pidfd_prepare(struct pid *pid, unsigned int flags, struct file **re · 2041 unmodified lines
20422042 if (IS_ERR(pidfd_file))
20432043 return PTR_ERR(pidfd_file);
20442044
2045− /*
2046− * anon_inode_getfile() ignores everything outside of the
2047− * O_ACCMODE | O_NONBLOCK mask, set PIDFD_THREAD manually.
2048− */
2049− pidfd_file->f_flags |= (flags & PIDFD_THREAD);
20502045 *ret = pidfd_file;
20512046 return take_fd(pidfd);
20522047 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t