aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2006-08-10 08:56:03 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2006-08-10 08:56:03 +0000
commit04d9e255dfea0a3bf86eeb984dd940d7705df670 (patch)
treeff609eae1e6ad0edb568bba1e2851ec62c82d2a4
parent1843f0c337ce02423edc8c704482a8c0034a0659 (diff)
getnewvnode() can be called with NULL mp.
Found by: Coverity Prevent (tm) Coverity ID: 1521 Confirmed by: phk
Notes
Notes: svn path=/head/; revision=161160
-rw-r--r--sys/kern/vfs_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 1710ad176bb1..4a271c399dd3 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -869,7 +869,7 @@ getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops,
* Wait for available vnodes.
*/
if (numvnodes > desiredvnodes) {
- if (mp->mnt_kern_flag & MNTK_SUSPEND) {
+ if (mp != NULL && (mp->mnt_kern_flag & MNTK_SUSPEND)) {
/*
* File system is beeing suspended, we cannot risk a
* deadlock here, so allocate new vnode anyway.