summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-09-10 19:47:37 +0000
committerphk <phk@FreeBSD.org>1997-09-10 19:47:37 +0000
commit8e20f7ec0eb58e4adf6aaa2f3a9ca01a9bce42c4 (patch)
tree62aa8cd1162b54cef39562b09199fb34b36110b5 /sys/ufs
parent577767a73abf60545bf417da9734d3351f4b3e5a (diff)
downloadFreeBSD-src-8e20f7ec0eb58e4adf6aaa2f3a9ca01a9bce42c4.zip
FreeBSD-src-8e20f7ec0eb58e4adf6aaa2f3a9ca01a9bce42c4.tar.gz
Update the comment and remove checks now done centrally.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_lookup.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index 1762fb0..e0eb989 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_lookup.c 8.15 (Berkeley) 6/16/95
- * $Id: ufs_lookup.c,v 1.15 1997/08/26 07:32:51 phk Exp $
+ * $Id: ufs_lookup.c,v 1.16 1997/09/02 20:06:58 bde Exp $
*/
#include <sys/param.h>
@@ -78,11 +78,23 @@ int dirchk = 0;
* be "."., but the caller must check to ensure it does an vrele and vput
* instead of two vputs.
*
- * Overall outline of ufs_lookup:
+ * This routine is actually used as VOP_CACHEDLOOKUP method, and the
+ * filesystem employs the generic vfs_cache_lookup() as VOP_LOOKUP
+ * method.
*
+ * vfs_cache_lookup() performs the following for us:
+ * check that it is a directory
* check accessibility of directory
- * look for name in cache, if found, then if at end of path
- * and deleting or creating, drop it, else return name
+ * check for modification attempts on read-only mounts
+ * if name found in cache
+ * if at end of path and deleting or creating
+ * drop it
+ * else
+ * return name.
+ * return VOP_CACHEDLOOKUP()
+ *
+ * Overall outline of ufs_lookup:
+ *
* search for name in directory, to found or notfound
* notfound:
* if creating, return locked directory, leaving info on available slots
@@ -138,18 +150,6 @@ ufs_lookup(ap)
wantparent = flags & (LOCKPARENT|WANTPARENT);
/*
- * Check accessiblity of directory.
- */
- if ((dp->i_mode & IFMT) != IFDIR)
- return (ENOTDIR);
- error = VOP_ACCESS(vdp, VEXEC, cred, cnp->cn_proc);
- if (error)
- return (error);
- if ((flags & ISLASTCN) && (vdp->v_mount->mnt_flag & MNT_RDONLY) &&
- (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME))
- return (EROFS);
-
- /*
* We now have a segment name to search for, and a directory to search.
*
* Suppress search for slots unless creating
OpenPOWER on IntegriCloud