Revert this commit to avoid a possible complaint by compiler when
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 12 May 2015 01:10:45 +0000 (10:10 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 12 May 2015 01:32:42 +0000 (10:32 +0900)
INVARIANTS is not set which leaves code 'if(cond);'.
Spotted-by: dillon
Revert "sys/vfs/tmpfs: Cleanups"

This reverts commit 215b902242b386e5a01c72d8245df7535bed0bd0.

sys/vfs/tmpfs/tmpfs_vnops.c

index 4a43281..b3f9d6e 100644 (file)
@@ -105,9 +105,12 @@ tmpfs_nresolve(struct vop_nresolve_args *v)
                tnode = de->td_node;
                error = tmpfs_alloc_vp(dvp->v_mount, tnode,
                                       LK_EXCLUSIVE | LK_RETRY, &vp);
-               if (error == 0)
-                       KKASSERT(vp);
+               if (error)
+                       goto out;
+               KKASSERT(vp);
        }
+
+out:
        TMPFS_NODE_UNLOCK(dnode);
 
        if ((dnode->tn_status & TMPFS_NODE_ACCESSED) == 0) {