Module Name: src
Committed By: christos
Date: Sat Feb 7 04:25:16 UTC 2015
Modified Files:
src/sys/fs/nilfs: nilfs_vfsops.c
Log Message:
fix devvp leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/fs/nilfs/nilfs_vfsops.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/nilfs/nilfs_vfsops.c
diff -u src/sys/fs/nilfs/nilfs_vfsops.c:1.18 src/sys/fs/nilfs/nilfs_vfsops.c:1.19
--- src/sys/fs/nilfs/nilfs_vfsops.c:1.18 Wed Oct 15 05:05:46 2014
+++ src/sys/fs/nilfs/nilfs_vfsops.c Fri Feb 6 23:25:16 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: nilfs_vfsops.c,v 1.18 2014/10/15 09:05:46 hannken Exp $ */
+/* $NetBSD: nilfs_vfsops.c,v 1.19 2015/02/07 04:25:16 christos Exp $ */
/*
* Copyright (c) 2008, 2009 Reinoud Zandijk
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.18 2014/10/15 09:05:46 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.19 2015/02/07 04:25:16 christos Exp $");
#endif /* not lint */
@@ -879,8 +879,10 @@ nilfs_mount(struct mount *mp, const char
#endif
error = nilfs_mount_device(devvp, mp, args, &nilfsdev);
- if (error)
+ if (error) {
+ vrele(devvp);
return error;
+ }
/*
* Create a nilfs_mount on the specified checkpoint. Note that only