From: Luis Henriques <luis@igalia.com>
To: Miklos Szeredi <miklos@szeredi.hu>, Al Viro <viro@zeniv.linux.org.uk>
Cc: mszeredi@suse.cz, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-dev@igalia.com,
Luis Henriques <luis@igalia.com>
Subject: [PATCH] fuse: add missing iput() in fuse_lookup() error path
Date: Fri, 19 Dec 2025 17:43:09 +0000 [thread overview]
Message-ID: <20251219174310.41703-1-luis@igalia.com> (raw)
The inode use count needs to be dropped in the fuse_lookup() error path,
when there's an error returned by d_splice_alias().
(While there, remove extra white spaces before labels.)
Fixes: 5835f3390e35 ("fuse: use d_materialise_unique()")
Signed-off-by: Luis Henriques <luis@igalia.com>
---
fs/fuse/dir.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 4b6b3d2758ff..75032b947a13 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -636,7 +636,7 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry,
newent = d_splice_alias(inode, entry);
err = PTR_ERR(newent);
if (IS_ERR(newent))
- goto out_err;
+ goto out_iput;
entry = newent ? newent : entry;
entry->d_time = epoch;
@@ -649,9 +649,9 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry,
fuse_advise_use_readdirplus(dir);
return newent;
- out_iput:
+out_iput:
iput(inode);
- out_err:
+out_err:
return ERR_PTR(err);
}
next reply other threads:[~2025-12-19 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 17:43 Luis Henriques [this message]
2025-12-19 22:10 ` Al Viro
2025-12-19 22:14 ` Al Viro
2025-12-23 14:31 ` Luis Henriques
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251219174310.41703-1-luis@igalia.com \
--to=luis@igalia.com \
--cc=kernel-dev@igalia.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®