summaryrefslogtreecommitdiff
path: root/src/sys/os/vfs_namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/os/vfs_namei.c')
-rw-r--r--src/sys/os/vfs_namei.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/sys/os/vfs_namei.c b/src/sys/os/vfs_namei.c
index e541611..1425c30 100644
--- a/src/sys/os/vfs_namei.c
+++ b/src/sys/os/vfs_namei.c
@@ -90,14 +90,15 @@ namei(struct nameidata *ndp)
lookup.dirvp = mp->vp;
lookup.vpp = &vp;
- /* If it was found, return */
- error = vops->lookup(&lookup);
- if (error == 0)
- return 0;
-
/* Return the result */
- if (ndp->vp_res != NULL)
+ error = vops->lookup(&lookup);
+ if (error == 0 && ndp->vp_res != NULL) {
*ndp->vp_res = vp;
+ }
+
+ if (error == 0) {
+ return 0;
+ }
}
printf("namei: f: %s\n", ndp->path);