vfs: retire the now unused SAVESTART flag
Bump __FreeBSD_version to 1400075 Tested by: pho
This commit is contained in:
parent
56da4aa554
commit
8f7859e800
@ -127,8 +127,7 @@ static vop_vptofh_t msdosfs_vptofh;
|
||||
/*
|
||||
* Create a regular file. On entry the directory to contain the file being
|
||||
* created is locked. We must release before we return. We must also free
|
||||
* the pathname buffer pointed at by cnp->cn_pnbuf, always on error, or
|
||||
* only if the SAVESTART bit in cn_flags is clear on success.
|
||||
* the pathname buffer pointed at by cnp->cn_pnbuf, always on error.
|
||||
*/
|
||||
static int
|
||||
msdosfs_create(struct vop_create_args *ap)
|
||||
|
@ -528,8 +528,7 @@ smbfs_write(ap)
|
||||
* smbfs_create call
|
||||
* Create a regular file. On entry the directory to contain the file being
|
||||
* created is locked. We must release before we return. We must also free
|
||||
* the pathname buffer pointed at by cnp->cn_pnbuf, always on error, or
|
||||
* only if the SAVESTART bit in cn_flags is clear on success.
|
||||
* the pathname buffer pointed at by cnp->cn_pnbuf, always on error.
|
||||
*/
|
||||
static int
|
||||
smbfs_create(ap)
|
||||
|
@ -675,9 +675,8 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp,
|
||||
refstart = false;
|
||||
if (nameiop == DELETE) {
|
||||
cn->cn_flags |= (cnp->cn_flags & DOWHITEOUT);
|
||||
refstart = (cnp->cn_flags & SAVESTART) != 0;
|
||||
} else if (RENAME == nameiop) {
|
||||
refstart = (cnp->cn_flags & SAVESTART) != 0;
|
||||
} else if (nameiop == RENAME) {
|
||||
refstart = true;
|
||||
} else if (nameiop == CREATE) {
|
||||
cn->cn_flags |= NOCACHE;
|
||||
}
|
||||
|
@ -4188,7 +4188,7 @@ cache_fpl_terminated(struct cache_fpl *fpl)
|
||||
|
||||
#define CACHE_FPL_SUPPORTED_CN_FLAGS \
|
||||
(NC_NOMAKEENTRY | NC_KEEPPOSENTRY | LOCKLEAF | LOCKPARENT | WANTPARENT | \
|
||||
FAILIFEXISTS | FOLLOW | EMPTYPATH | LOCKSHARED | SAVESTART | WILLBEDIR | \
|
||||
FAILIFEXISTS | FOLLOW | EMPTYPATH | LOCKSHARED | WILLBEDIR | \
|
||||
ISOPEN | NOMACCHECK | AUDITVNODE1 | AUDITVNODE2 | NOCAPCHECK | OPENREAD | \
|
||||
OPENWRITE | WANTIOCTLCAPS)
|
||||
|
||||
@ -4424,7 +4424,7 @@ cache_fplookup_final_child(struct cache_fpl *fpl, enum vgetstate tvs)
|
||||
static int __noinline
|
||||
cache_fplookup_final_modifying(struct cache_fpl *fpl)
|
||||
{
|
||||
struct nameidata *ndp;
|
||||
struct nameidata *ndp __diagused;
|
||||
struct componentname *cnp;
|
||||
enum vgetstate dvs;
|
||||
struct vnode *dvp, *tvp;
|
||||
@ -4539,10 +4539,6 @@ cache_fplookup_final_modifying(struct cache_fpl *fpl)
|
||||
fpl->tvp = tvp;
|
||||
|
||||
if (tvp == NULL) {
|
||||
if ((cnp->cn_flags & SAVESTART) != 0) {
|
||||
ndp->ni_startdir = dvp;
|
||||
vrefact(ndp->ni_startdir);
|
||||
}
|
||||
MPASS(error == EJUSTRETURN);
|
||||
if ((cnp->cn_flags & LOCKPARENT) == 0) {
|
||||
VOP_UNLOCK(dvp);
|
||||
@ -4599,11 +4595,6 @@ cache_fplookup_final_modifying(struct cache_fpl *fpl)
|
||||
VOP_UNLOCK(dvp);
|
||||
}
|
||||
|
||||
if ((cnp->cn_flags & SAVESTART) != 0) {
|
||||
ndp->ni_startdir = dvp;
|
||||
vrefact(ndp->ni_startdir);
|
||||
}
|
||||
|
||||
return (cache_fpl_handled(fpl));
|
||||
}
|
||||
|
||||
@ -4758,8 +4749,6 @@ cache_fplookup_degenerate(struct cache_fpl *fpl)
|
||||
return (cache_fpl_handled_error(fpl, EISDIR));
|
||||
}
|
||||
|
||||
MPASS((cnp->cn_flags & SAVESTART) == 0);
|
||||
|
||||
if ((cnp->cn_flags & (LOCKPARENT|WANTPARENT)) != 0) {
|
||||
return (cache_fplookup_final_withparent(fpl));
|
||||
}
|
||||
@ -4880,8 +4869,6 @@ cache_fplookup_noentry(struct cache_fpl *fpl)
|
||||
return (cache_fplookup_modifying(fpl));
|
||||
}
|
||||
|
||||
MPASS((cnp->cn_flags & SAVESTART) == 0);
|
||||
|
||||
/*
|
||||
* Only try to fill in the component if it is the last one,
|
||||
* otherwise not only there may be several to handle but the
|
||||
@ -6060,9 +6047,6 @@ cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status,
|
||||
KASSERT ((cnp->cn_flags & CACHE_FPL_INTERNAL_CN_FLAGS) == 0,
|
||||
("%s: internal flags found in cn_flags %" PRIx64, __func__,
|
||||
cnp->cn_flags));
|
||||
if ((cnp->cn_flags & SAVESTART) != 0) {
|
||||
MPASS(cnp->cn_nameiop != LOOKUP);
|
||||
}
|
||||
MPASS(cnp->cn_nameptr == cnp->cn_pnbuf);
|
||||
|
||||
if (__predict_false(!cache_can_fplookup(&fpl))) {
|
||||
|
@ -800,9 +800,6 @@ vfs_lookup_degenerate(struct nameidata *ndp, struct vnode *dp, int wantparent)
|
||||
|
||||
if (!(cnp->cn_flags & (LOCKPARENT | LOCKLEAF)))
|
||||
VOP_UNLOCK(dp);
|
||||
/* XXX This should probably move to the top of function. */
|
||||
if (cnp->cn_flags & SAVESTART)
|
||||
panic("lookup: SAVESTART");
|
||||
return (0);
|
||||
bad:
|
||||
VOP_UNLOCK(dp);
|
||||
@ -1208,10 +1205,6 @@ vfs_lookup(struct nameidata *ndp)
|
||||
* doesn't currently exist, leaving a pointer to the
|
||||
* (possibly locked) directory vnode in ndp->ni_dvp.
|
||||
*/
|
||||
if (cnp->cn_flags & SAVESTART) {
|
||||
ndp->ni_startdir = ndp->ni_dvp;
|
||||
VREF(ndp->ni_startdir);
|
||||
}
|
||||
goto success;
|
||||
}
|
||||
|
||||
@ -1366,10 +1359,6 @@ vfs_lookup(struct nameidata *ndp)
|
||||
error = EROFS;
|
||||
goto bad2;
|
||||
}
|
||||
if (cnp->cn_flags & SAVESTART) {
|
||||
ndp->ni_startdir = ndp->ni_dvp;
|
||||
VREF(ndp->ni_startdir);
|
||||
}
|
||||
if (!wantparent) {
|
||||
ni_dvp_unlocked = 2;
|
||||
if (ndp->ni_dvp != dp)
|
||||
|
@ -161,7 +161,7 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status,
|
||||
*/
|
||||
#define RDONLY 0x00000200 /* lookup with read-only semantics */
|
||||
/* UNUSED 0x00000400 */
|
||||
#define SAVESTART 0x00000800 /* save starting directory */
|
||||
/* UNUSED 0x00000800 */
|
||||
#define ISWHITEOUT 0x00001000 /* found whiteout */
|
||||
#define DOWHITEOUT 0x00002000 /* do whiteouts */
|
||||
#define WILLBEDIR 0x00004000 /* new files will be dirs; allow trailing / */
|
||||
|
@ -76,7 +76,7 @@
|
||||
* cannot include sys/param.h and should only be updated here.
|
||||
*/
|
||||
#undef __FreeBSD_version
|
||||
#define __FreeBSD_version 1400074
|
||||
#define __FreeBSD_version 1400075
|
||||
|
||||
/*
|
||||
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
|
||||
|
Loading…
Reference in New Issue
Block a user