aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorEric W. Biederman <[email protected]>2020-11-20 17:14:36 -0600
committerEric W. Biederman <[email protected]>2020-12-10 12:42:59 -0600
commite06b53c22f31ebba4c46d02fb3a58336135db45c (patch)
tree133bb1ff44d98374290fc7e145f213598fd27811 /tools/perf/scripts/python
parentd74ba04d919ebe30bf47406819c18c6b50003d92 (diff)
file: In f_dupfd read RLIMIT_NOFILE once.
Simplify the code, and remove the chance of races by reading RLIMIT_NOFILE only once in f_dupfd. Pass the read value of RLIMIT_NOFILE into alloc_fd which is the other location the rlimit was read in f_dupfd. As f_dupfd is the only caller of alloc_fd this changing alloc_fd is trivially safe. Further this causes alloc_fd to take all of the same arguments as __alloc_fd except for the files_struct argument. Acked-by: Christian Brauner <[email protected]> v1: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Eric W. Biederman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions