]> git.ipfire.org Git - thirdparty/linux.git/commit
close_files(): don't bother with xchg()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 1 Aug 2024 20:03:19 +0000 (16:03 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Oct 2024 17:34:41 +0000 (13:34 -0400)
commit1fa4ffd8e6f6d001da27f00382af79bad0336091
tree78dab44686bca3ed88fc15f8ae765a7d8e73807c
parentbe5498cac2ddb112c5bd7433d5e834a1a2493427
close_files(): don't bother with xchg()

At that point nobody else has references to the victim files_struct;
as the matter of fact, the caller will free it immediately after
close_files() returns, with no RCU delays or anything of that sort.

That's why we are not protecting against fdtable reallocation on
expansion, not cleaning the bitmaps, etc.  There's no point
zeroing the pointers in ->fd[] either, let alone make that an
atomic operation.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/file.c