diff options
author | 2001-04-25 21:31:17 +0000 | |
---|---|---|
committer | 2001-04-25 21:31:17 +0000 | |
commit | 9a0d36500557af3363df4997cbb211552722318d (patch) | |
tree | 39fce272836770bb96b44ad3ce899caa562471fc | |
parent | General cleanup and updates here too, ok deraadt@ (diff) | |
download | wireguard-openbsd-9a0d36500557af3363df4997cbb211552722318d.tar.xz wireguard-openbsd-9a0d36500557af3363df4997cbb211552722318d.zip |
Quick fix for code path in RENAME in case relookup doesn't find the file again
Also, get rid of a bogus comment.
Patch from art@
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 211b66cad2b..30d2a3aa468 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.30 2001/03/01 20:54:36 provos Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.31 2001/04/25 21:31:17 csapuntz Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -921,9 +921,6 @@ abortit: return (error); } - /* - * Check if just deleting a link name. - */ if (tvp && ((VTOI(tvp)->i_ffs_flags & (IMMUTABLE | APPEND)) || (VTOI(tdvp)->i_ffs_flags & APPEND))) { error = EPERM; @@ -967,6 +964,9 @@ abortit: panic("ufs_rename: lost from startdir"); fcnp->cn_nameiop = DELETE; (void) relookup(fdvp, &fvp, fcnp); + if (fvp == NULL) { + return (ENOENT); + } return (VOP_REMOVE(fdvp, fvp, fcnp)); } |