[PATCH v4 02/30] cachefiles: Fix double fput
David Howells <[email protected]>
| Newsgroups | gmane.linux.file-systems,gmane.linux.kernel.cifs,gmane.linux.nfs,gmane.comp.file-systems.ceph.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> cc: Paulo Alcantara <[email protected]> cc: [email protected] cc: [email protected] --- fs/cachefiles/namei.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 2937db690b40..a464c4646c04 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -467,7 +467,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; }