summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2026-06-25 15:06:21 +0100
committerChristian Brauner <brauner@kernel.org>2026-07-01 15:26:28 +0200
commitaf6830cc12dfe86c832dccc9c9878a93aaa22f83 (patch)
tree81409508628e711c94d428e792762fbfae1f957c /fs
parentdbd6f56d975b23241b7bbb11bb8f562af548a0aa (diff)
downloadlwn-af6830cc12dfe86c832dccc9c9878a93aaa22f83.tar.gz
lwn-af6830cc12dfe86c832dccc9c9878a93aaa22f83.zip
cachefiles: Fix double fput
Fix a double fput() in error handling in cachefiles_create_tmpfile(). Link: https://sashiko.dev/#/patchset/20260608145432.681865-1-dhowells%40redhat.com Signed-off-by: David Howells <dhowells@redhat.com> Link: https://patch.msgid.link/20260625140640.3116900-4-dhowells@redhat.com cc: Paulo Alcantara <pc@manguebit.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cachefiles/namei.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
index 2c46f0decb02..67793898148b 100644
--- a/fs/cachefiles/namei.c
+++ b/fs/cachefiles/namei.c
@@ -466,7 +466,6 @@ struct file *cachefiles_create_tmpfile(struct cachefiles_object *object)
ret = -EINVAL;
if (unlikely(!file->f_op->read_iter) ||
unlikely(!file->f_op->write_iter)) {
- fput(file);
pr_notice("Cache does not support read_iter and write_iter\n");
goto err_unuse;
}