Module Name:    src
Committed By:   hannken
Date:           Mon Nov 21 10:46:57 UTC 2011

Modified Files:
        src/sys/fs/msdosfs: msdosfs_vnops.c

Log Message:
Add missing fstrans_done().

Should fix PR #45635 (KASSERT "fli->fli_trans_cnt == 0" failed)


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/msdosfs/msdosfs_vnops.c
diff -u src/sys/fs/msdosfs/msdosfs_vnops.c:1.78 src/sys/fs/msdosfs/msdosfs_vnops.c:1.79
--- src/sys/fs/msdosfs/msdosfs_vnops.c:1.78	Wed Jul 20 11:52:00 2011
+++ src/sys/fs/msdosfs/msdosfs_vnops.c	Mon Nov 21 10:46:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vnops.c,v 1.78 2011/07/20 11:52:00 hannken Exp $	*/
+/*	$NetBSD: msdosfs_vnops.c,v 1.79 2011/11/21 10:46:56 hannken Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.78 2011/07/20 11:52:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.79 2011/11/21 10:46:56 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -499,8 +499,10 @@ msdosfs_read(void *v)
 		lbn = de_cluster(pmp, uio->uio_offset);
 		on = uio->uio_offset & pmp->pm_crbomask;
 		n = MIN(pmp->pm_bpcluster - on, uio->uio_resid);
-		if (uio->uio_offset >= dep->de_FileSize)
+		if (uio->uio_offset >= dep->de_FileSize) {
+			fstrans_done(vp->v_mount);
 			return (0);
+		}
 		/* file size (and hence diff) may be up to 4GB */
 		diff = dep->de_FileSize - uio->uio_offset;
 		if (diff < n)

Reply via email to