mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
fs: touch up predicts in putname()
1. we already expect the refcount is 1. 2. path creation predicts name == iname I verified this straightens out the asm, no functional changes. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://patch.msgid.link/20251029134952.658450-1-mjguzik@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
0bbb838f38
commit
20052f2ef0
@@ -282,7 +282,7 @@ void putname(struct filename *name)
|
||||
return;
|
||||
|
||||
refcnt = atomic_read(&name->refcnt);
|
||||
if (refcnt != 1) {
|
||||
if (unlikely(refcnt != 1)) {
|
||||
if (WARN_ON_ONCE(!refcnt))
|
||||
return;
|
||||
|
||||
@@ -290,7 +290,7 @@ void putname(struct filename *name)
|
||||
return;
|
||||
}
|
||||
|
||||
if (name->name != name->iname) {
|
||||
if (unlikely(name->name != name->iname)) {
|
||||
__putname(name->name);
|
||||
kfree(name);
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user