diff options
author | Christian Brauner <brauner@kernel.org> | 2024-06-27 17:11:39 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-06-28 11:36:45 +0300 |
commit | c6269149cbf7053272d918101981869438ff7c1e (patch) | |
tree | 56268222b9012639dff71b6a54f5e756a82ed3cc /tools/perf/scripts/python/export-to-sqlite.py | |
parent | ff2c570ef7eaa9ded58e7a02dd7a68874a897508 (diff) | |
download | linux-c6269149cbf7053272d918101981869438ff7c1e.tar.xz |
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-sqlite.py')
0 files changed, 0 insertions, 0 deletions