fs: use fput_close_sync() in close()

This bumps open+close rate by 1% on Sapphire Rapids by eliding one
atomic.

It would be higher if it was not for several other slowdowns of the same
nature.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20250305123644.554845-3-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Mateusz Guzik
2025-03-05 13:36:42 +01:00
committed by Christian Brauner
parent e83588458f
commit 3e46a92a27

View File

@@ -1576,7 +1576,7 @@ SYSCALL_DEFINE1(close, unsigned int, fd)
* We're returning to user space. Don't bother
* with any delayed fput() cases.
*/
__fput_sync(file);
fput_close_sync(file);
if (likely(retval == 0))
return 0;