Print this page
10084 fop_open() doesn't need to check for a NULL vnode

@@ -19,11 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2017, Joyent, Inc.
+ * Copyright (c) 2018, Joyent, Inc.
  * Copyright 2016 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
  */
 
 /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */

@@ -3366,11 +3366,11 @@
                  * copy over the path, do so here, rather than special
                  * casing each filesystem. Adjust the vnode counts to
                  * reflect the vnode switch.
                  */
                 VOPSTATS_UPDATE(*vpp, open);
-                if (*vpp != vp && *vpp != NULL) {
+                if (*vpp != vp) {
                         vn_copypath(vp, *vpp);
                         if (((*vpp)->v_type == VREG) && (mode & FREAD))
                                 atomic_inc_32(&(*vpp)->v_rdcnt);
                         if ((vp->v_type == VREG) && (mode & FREAD))
                                 atomic_dec_32(&vp->v_rdcnt);