VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Christian König <christian.koenig@amd.com> 2021-04-23 14:28:51 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-04-23 14:42:39 -0700 commit: 9da29c7f77cd04e5c9150e30f047521b6f20a918 parent: 5bfc75d92efd494db37f5c4c173d3639d4772966
Commit Summary:
coda: fix reference counting in coda_file_mmap error path
Diffstat:
1 file changed, 3 insertions, 3 deletions
diff --git a/fs/coda/file.c b/fs/coda/file.c
index 128d63df5bfb..ef5ca22bfb3e 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -175,10 +175,10 @@ coda_file_mmap(struct file *coda_file, struct vm_area_struct *vma)
 	ret = call_mmap(vma->vm_file, vma);
 
 	if (ret) {
-		/* if call_mmap fails, our caller will put coda_file so we
-		 * should drop the reference to the host_file that we got.
+		/* if call_mmap fails, our caller will put host_file so we
+		 * should drop the reference to the coda_file that we got.
 		 */
-		fput(host_file);
+		fput(coda_file);
 		kfree(cvm_ops);
 	} else {
 		/* here we add redirects for the open/close vm_operations */