Module Name: src
Committed By: christos
Date: Fri Jan 29 10:42:30 UTC 2016
Modified Files:
src/sys/fs/udf: udf_vfsops.c
Log Message:
It is meaningless to check the root node if there was an error.
To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/fs/udf/udf_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/udf/udf_vfsops.c
diff -u src/sys/fs/udf/udf_vfsops.c:1.71 src/sys/fs/udf/udf_vfsops.c:1.72
--- src/sys/fs/udf/udf_vfsops.c:1.71 Mon Aug 24 04:31:56 2015
+++ src/sys/fs/udf/udf_vfsops.c Fri Jan 29 05:42:30 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vfsops.c,v 1.71 2015/08/24 08:31:56 hannken Exp $ */
+/* $NetBSD: udf_vfsops.c,v 1.72 2016/01/29 10:42:30 christos Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.71 2015/08/24 08:31:56 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.72 2016/01/29 10:42:30 christos Exp $");
#endif /* not lint */
@@ -756,11 +756,12 @@ udf_root(struct mount *mp, struct vnode
dir_loc = &ump->fileset_desc->rootdir_icb;
error = udf_get_node(ump, dir_loc, &root_dir);
- if (!root_dir)
- error = ENOENT;
if (error)
return error;
+ if (!root_dir)
+ error = ENOENT;
+
vp = root_dir->vnode;
KASSERT(vp->v_vflag & VV_ROOT);