diff options
author | 2024-06-27 16:11:39 +0200 | |
---|---|---|
committer | 2024-06-28 10:36:45 +0200 | |
commit | c6269149cbf7053272d918101981869438ff7c1e (patch) | |
tree | 56268222b9012639dff71b6a54f5e756a82ed3cc /tools/perf/scripts/python/export-to-postgresql.py | |
parent | path: add cleanup helper (diff) | |
download | wireguard-linux-c6269149cbf7053272d918101981869438ff7c1e.tar.xz wireguard-linux-c6269149cbf7053272d918101981869438ff7c1e.zip |
file: add take_fd() cleanup helper
Add a helper that returns the file descriptor and ensures that the old
variable contains a negative value. This makes it easy to rely on
CLASS(get_unused_fd).
Link: https://lore.kernel.org/r/20240627-work-pidfs-v1-1-7e9ab6cc3bb1@kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions