summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-09-21 16:15:29 +0200
committerChristian Brauner <brauner@kernel.org>2026-10-05 13:02:39 +0200
commit2eb8f7b0375111ee23de4e731ef737c411297088 (patch)
tree8e0e33a5bb9f46df47dc1b953988a024357f2467 /tools/lib/python/kdoc/python_version.py
parentfd73f4a6659897191fa0d40695fe370925dd3780 (diff)
downloadlinux-next-2eb8f7b0375111ee23de4e731ef737c411297088.tar.gz
linux-next-2eb8f7b0375111ee23de4e731ef737c411297088.zip
file: let dup_fd() leave the punched hole behind
close_range(CLOSE_RANGE_UNSHARE) passed the range it is about to close to dup_fd() so the clone is done without that range. This only works when the last open descriptor falls into the range. A range in the middle of the table is copied like everything else. That's wasteful. Don't copy them. Descriptors in a skipped range stay open in the source fdtable. They are never copied into the new table and no reference is taken on them. Figuring out the size of the table follows the same rule. That drops the special-case it has now. This also means we stop calling ->flush() on fds from a table they were never part of. With the range at the top of the table that was already mostly the case. Link: https://patch.msgid.link/20260921-work-file-close_range_except-v1-1-c20d0b49270d@kernel.org Reviewed-by: Jann Horn <jannh@google.com> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions