[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251219174310.41703-1-luis@igalia.com>
Date: Fri, 19 Dec 2025 17:43:09 +0000
From: Luis Henriques <luis@...lia.com>
To: Miklos Szeredi <miklos@...redi.hu>,
Al Viro <viro@...iv.linux.org.uk>
Cc: mszeredi@...e.cz,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
kernel-dev@...lia.com,
Luis Henriques <luis@...lia.com>
Subject: [PATCH] fuse: add missing iput() in fuse_lookup() error path
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@...lia.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);
}
Powered by blists - more mailing lists