mirror of
https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10.git
synced 2026-09-09 00:07:04 +08:00
cachefiles: Fix double fput
JIRA: https://issues.redhat.com/browse/RHEL-190706 commit af6830cc12dfe86c832dccc9c9878a93aaa22f83 Author: David Howells <dhowells@redhat.com> Date: Thu Jun 25 15:06:21 2026 +0100 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> Signed-off-by: Paulo Alcantara <paalcant@redhat.com>
This commit is contained in:
@@ -497,7 +497,6 @@ struct file *cachefiles_create_tmpfile(struct cachefiles_object *object)
|
|||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
if (unlikely(!file->f_op->read_iter) ||
|
if (unlikely(!file->f_op->read_iter) ||
|
||||||
unlikely(!file->f_op->write_iter)) {
|
unlikely(!file->f_op->write_iter)) {
|
||||||
fput(file);
|
|
||||||
pr_notice("Cache does not support read_iter and write_iter\n");
|
pr_notice("Cache does not support read_iter and write_iter\n");
|
||||||
goto err_unuse;
|
goto err_unuse;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user