git: 0134bbe56fbb - main - vfs: prefix lookup and relookup with vfs_
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 13 Mar 2022 14:46:20 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0134bbe56fbbf3a53a6eeefeb21c66a998654a29 commit 0134bbe56fbbf3a53a6eeefeb21c66a998654a29 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-03-13 14:44:39 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-03-13 14:44:39 +0000 vfs: prefix lookup and relookup with vfs_ Reviewed by: imp, mckusick Differential Revision: https://reviews.freebsd.org/D34530 --- sys/fs/ext2fs/ext2_vnops.c | 4 ++-- sys/fs/nfsserver/nfs_nfsdport.c | 2 +- sys/fs/unionfs/union_subr.c | 4 ++-- sys/kern/vfs_lookup.c | 6 +++--- sys/sys/namei.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index a00b2121308a..9843fc16e6b2 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -919,7 +919,7 @@ abortit: if (error) goto out; VREF(tdvp); - error = relookup(tdvp, &tvp, tcnp); + error = vfs_relookup(tdvp, &tvp, tcnp); if (error) goto out; vrele(tdvp); @@ -1045,7 +1045,7 @@ abortit: fcnp->cn_flags &= ~MODMASK; fcnp->cn_flags |= LOCKPARENT | LOCKLEAF; VREF(fdvp); - error = relookup(fdvp, &fvp, fcnp); + error = vfs_relookup(fdvp, &fvp, fcnp); if (error == 0) vrele(fdvp); if (fvp != NULL) { diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 03f299ff0a10..5dbe20f7a66a 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -677,7 +677,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, * In either case ni_startdir will be dereferenced and NULLed * out. */ - error = lookup(ndp); + error = vfs_lookup(ndp); if (error) break; diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 08202501fe02..a3a5feef3291 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -681,7 +681,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, vref(dvp); VOP_UNLOCK(dvp); - if ((error = relookup(dvp, vpp, cn))) { + if ((error = vfs_relookup(dvp, vpp, cn))) { vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); } else vrele(dvp); @@ -1028,7 +1028,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, NDPREINIT(&nd); vref(udvp); - if ((error = relookup(udvp, &vp, &nd.ni_cnd)) != 0) + if ((error = vfs_relookup(udvp, &vp, &nd.ni_cnd)) != 0) goto unionfs_vn_create_on_upper_free_out2; vrele(udvp); diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index e91a43572cbd..cb0a9c2a216c 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -655,7 +655,7 @@ namei(struct nameidata *ndp) */ for (;;) { ndp->ni_startdir = dp; - error = lookup(ndp); + error = vfs_lookup(ndp); if (error != 0) goto out; @@ -843,7 +843,7 @@ _Static_assert(MAXNAMLEN == NAME_MAX, * if WANTPARENT set, return unlocked parent in ni_dvp */ int -lookup(struct nameidata *ndp) +vfs_lookup(struct nameidata *ndp) { char *cp; /* pointer into pathname argument */ char *prev_ni_next; /* saved ndp->ni_next */ @@ -1388,7 +1388,7 @@ bad_eexist: * Used by lookup to re-acquire things. */ int -relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) +vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { struct vnode *dp = NULL; /* the directory we are searching */ int rdonly; /* lookup read-only flag bit */ diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 965a2b757f49..23718dde5bed 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -305,8 +305,8 @@ void NDVALIDATE(struct nameidata *); #endif int namei(struct nameidata *ndp); -int lookup(struct nameidata *ndp); -int relookup(struct vnode *dvp, struct vnode **vpp, +int vfs_lookup(struct nameidata *ndp); +int vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp); #endif