From: Mateusz Guzik Date: Wed, 5 Mar 2025 12:36:42 +0000 (+0100) Subject: fs: use fput_close_sync() in close() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3e46a92a27c2927fcef996ba06cbe299da629c28;p=users%2Fjedix%2Flinux-maple.git 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 Link: https://lore.kernel.org/r/20250305123644.554845-3-mjguzik@gmail.com Signed-off-by: Christian Brauner --- diff --git a/fs/open.c b/fs/open.c index a8a5f843e3cf6..47615d0e1d9c7 100644 --- a/fs/open.c +++ b/fs/open.c @@ -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;