[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250304183506.498724-5-mjguzik@gmail.com>
Date: Tue, 4 Mar 2025 19:35:06 +0100
From: Mateusz Guzik <mjguzik@...il.com>
To: brauner@...nel.org,
viro@...iv.linux.org.uk
Cc: jack@...e.cz,
linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
Mateusz Guzik <mjguzik@...il.com>
Subject: [PATCH v2 4/4] fs: use fput_close() in path_openat()
This bumps failing open rate by 1.7% on Sapphire Rapids by avoiding one
atomic.
Signed-off-by: Mateusz Guzik <mjguzik@...il.com>
---
fs/namei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/namei.c b/fs/namei.c
index 8ce8e6038346..d38b8dc16b4b 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -4014,7 +4014,7 @@ static struct file *path_openat(struct nameidata *nd,
WARN_ON(1);
error = -EINVAL;
}
- fput(file);
+ fput_close(file);
if (error == -EOPENSTALE) {
if (flags & LOOKUP_RCU)
error = -ECHILD;
--
2.43.0
Powered by blists - more mailing lists