Fix the problem with panics when mounting on nonexistant directories. Probably

my fault in the first place...
This commit is contained in:
Poul-Henning Kamp 1994-10-15 02:53:26 +00:00
parent ea3a7da2c8
commit 17b9f9f4a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3602
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.12 1994/10/08 22:33:43 phk Exp $
* $Id: vfs_syscalls.c,v 1.13 1994/10/11 20:40:12 sos Exp $
*/
#include <sys/param.h>
@ -94,7 +94,7 @@ mount(p, uap, retval)
* Get vnode to be covered
*/
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->path, p);
namei(&nd);
error = namei(&nd);
if (error)
return (error);
vp = nd.ni_vp;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.12 1994/10/08 22:33:43 phk Exp $
* $Id: vfs_syscalls.c,v 1.13 1994/10/11 20:40:12 sos Exp $
*/
#include <sys/param.h>
@ -94,7 +94,7 @@ mount(p, uap, retval)
* Get vnode to be covered
*/
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->path, p);
namei(&nd);
error = namei(&nd);
if (error)
return (error);
vp = nd.ni_vp;