diff options
Diffstat (limited to 'sys/fs/hpfs')
-rw-r--r-- | sys/fs/hpfs/hpfs_vfsops.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index 5ce5215..69f7a78 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -161,7 +161,7 @@ hpfs_mount ( * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(&ndp, LOOKUP, FOLLOW, UIO_SYSSPACE, from, td); + NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, td); err = namei(&ndp); if (err) { /* can't get devvp!*/ @@ -170,8 +170,10 @@ hpfs_mount ( devvp = ndp.ni_vp; - if (!vn_isdisk(devvp, &err)) - goto error_2; + if (!vn_isdisk(devvp, &err)) { + vput(devvp); + return (err); + } /* ******************** @@ -197,12 +199,6 @@ hpfs_mount ( goto success; - -error_2: /* error with devvp held*/ - - /* release devvp before failing*/ - vrele(devvp); - error_1: /* no state to back out*/ /* XXX: Missing NDFREE(&ndp, ...) */ |