Page MenuHomeFreeBSD

D46709.diff
No OneTemporary

D46709.diff

diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -862,7 +862,7 @@
return (val);
vn_lock(be_lun->vn, LK_SHARED | LK_RETRY);
if (strcmp(attrname, "blocksused") == 0) {
- error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred);
+ error = VOP_GETATTR(be_lun->vn, 0, &vattr, curthread->td_ucred);
if (error == 0)
val = vattr.va_bytes / be_lun->cbe_lun.blocksize;
}
@@ -2233,7 +2233,7 @@
be_lun->unmap = ctl_be_block_unmap_file;
cbe_lun->flags &= ~CTL_LUN_FLAG_UNMAP;
- error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred);
+ error = VOP_GETATTR(be_lun->vn, 0, &vattr, curthread->td_ucred);
if (error != 0) {
snprintf(req->error_str, sizeof(req->error_str),
"error calling VOP_GETATTR() for file %s",
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -1377,7 +1377,7 @@
if (vp != NULL) {
vn_fullpath(vp, &name, &freename);
vn_lock(vp, LK_SHARED | LK_RETRY);
- VOP_GETATTR(vp, &vat, td->td_ucred);
+ VOP_GETATTR(vp, 0, &vat, td->td_ucred);
ino = vat.va_fileid;
vput(vp);
} else if (SV_PROC_ABI(p) == SV_ABI_LINUX) {
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c
--- a/sys/compat/linux/linux_stats.c
+++ b/sys/compat/linux/linux_stats.c
@@ -106,7 +106,7 @@
error = linux_kern_fstat(td, fd, sbp);
return (error);
}
- error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED);
+ error = VOP_STAT(nd.ni_vp, sbp, 0, td->td_ucred, NOCRED);
if (error == 0)
translate_vnhook_major_minor(nd.ni_vp, sbp);
NDFREE_PNBUF(&nd);
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -1675,7 +1675,7 @@
vp = filp->f_vnode;
vn_lock(vp, LK_SHARED | LK_RETRY);
- error = VOP_STAT(vp, sb, curthread->td_ucred, NOCRED);
+ error = VOP_STAT(vp, sb, 0, curthread->td_ucred, NOCRED);
VOP_UNLOCK(vp);
return (error);
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c
@@ -1347,7 +1347,7 @@
vattr.va_mask = AT_UID;
vn_lock(mvp, LK_SHARED | LK_RETRY);
- if (VOP_GETATTR(mvp, &vattr, cr)) {
+ if (VOP_GETATTR(mvp, 0, &vattr, cr)) {
VOP_UNLOCK(mvp);
goto out;
}
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -5206,7 +5206,7 @@
NDFREE_PNBUF(&nd);
if (ap->a_size != NULL) {
- error = VOP_GETATTR(vp, &va, ap->a_cred);
+ error = VOP_GETATTR(vp, 0, &va, ap->a_cred);
if (error == 0)
*ap->a_size = (size_t)va.va_size;
} else if (ap->a_uio != NULL)
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -1442,7 +1442,7 @@
error = EINVAL;
goto bad;
}
- error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred);
+ error = VOP_GETATTR(nd.ni_vp, 0, &vattr, td->td_ucred);
if (error != 0)
goto bad;
if ((mdr->md_options & MD_MUSTDEALLOC) != 0) {
diff --git a/sys/fs/autofs/autofs_vnops.c b/sys/fs/autofs/autofs_vnops.c
--- a/sys/fs/autofs/autofs_vnops.c
+++ b/sys/fs/autofs/autofs_vnops.c
@@ -95,7 +95,7 @@
return (error);
if (newvp != NULL) {
- error = VOP_GETATTR(newvp, ap->a_vap,
+ error = VOP_GETATTR(newvp, 0, ap->a_vap,
ap->a_cred);
vput(newvp);
return (error);
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c
--- a/sys/fs/nfsclient/nfs_clbio.c
+++ b/sys/fs/nfsclient/nfs_clbio.c
@@ -383,7 +383,7 @@
}
np->n_attrstamp = 0;
KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp);
- error = VOP_GETATTR(vp, &vattr, cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cred);
if (error)
goto out;
NFSLOCKNODE(np);
@@ -391,7 +391,7 @@
NFSUNLOCKNODE(np);
} else {
NFSUNLOCKNODE(np);
- error = VOP_GETATTR(vp, &vattr, cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cred);
if (error)
goto out;
NFSLOCKNODE(np);
@@ -921,7 +921,7 @@
if (!NFSHASNFSV4(nmp) || NFSHASPNFS(nmp)) {
np->n_attrstamp = 0;
KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp);
- error = VOP_GETATTR(vp, &vattr, cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cred);
if (error)
return (error);
}
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -663,7 +663,7 @@
if (vp->v_type == VDIR)
np->n_direofoffset = 0;
NFSUNLOCKNODE(np);
- error = VOP_GETATTR(vp, &vattr, ap->a_cred);
+ error = VOP_GETATTR(vp, 0, &vattr, ap->a_cred);
if (error) {
if (NFS_ISV4(vp))
(void) nfsrpc_close(vp, 0, ap->a_td);
@@ -675,7 +675,7 @@
np->n_change = vattr.va_filerev;
} else {
NFSUNLOCKNODE(np);
- error = VOP_GETATTR(vp, &vattr, ap->a_cred);
+ error = VOP_GETATTR(vp, 0, &vattr, ap->a_cred);
if (error) {
if (NFS_ISV4(vp))
(void) nfsrpc_close(vp, 0, ap->a_td);
@@ -1276,7 +1276,7 @@
}
if (nfscl_nodeleg(newvp, 0) == 0 ||
((u_int)(ticks - ncticks) < (nmp->nm_nametimeo * hz) &&
- VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 &&
+ VOP_GETATTR(newvp, 0, &vattr, cnp->cn_cred) == 0 &&
timespeccmp(&vattr.va_ctime, &nctime, ==))) {
NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits);
return (0);
@@ -1300,7 +1300,7 @@
* seconds.
*/
if ((u_int)(ticks - ncticks) < (nmp->nm_negnametimeo * hz) &&
- VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 &&
+ VOP_GETATTR(dvp, 0, &vattr, cnp->cn_cred) == 0 &&
timespeccmp(&vattr.va_mtime, &nctime, ==)) {
NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits);
return (ENOENT);
@@ -1653,7 +1653,7 @@
rdev = 0xffffffff;
else
return (EOPNOTSUPP);
- if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)))
+ if ((error = VOP_GETATTR(dvp, 0, &vattr, cnp->cn_cred)))
return (error);
error = nfsrpc_mknod(dvp, cnp->cn_nameptr, cnp->cn_namelen, vap,
rdev, vap->va_type, cnp->cn_cred, curthread, &dnfsva,
@@ -1753,7 +1753,7 @@
if (vap->va_type == VSOCK)
return (nfs_mknodrpc(dvp, ap->a_vpp, cnp, vap));
- if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)))
+ if ((error = VOP_GETATTR(dvp, 0, &vattr, cnp->cn_cred)))
return (error);
if (vap->va_vaflags & VA_EXCLUSIVE)
fmode |= O_EXCL;
@@ -1869,7 +1869,7 @@
if (vp->v_type == VDIR)
error = EPERM;
else if (vrefcnt(vp) == 1 || (np->n_sillyrename &&
- VOP_GETATTR(vp, &vattr, cnp->cn_cred) == 0 &&
+ VOP_GETATTR(vp, 0, &vattr, cnp->cn_cred) == 0 &&
vattr.va_nlink > 1)) {
/*
* Purge the name cache so that the chance of a lookup for
@@ -2296,7 +2296,7 @@
struct nfsvattr nfsva, dnfsva;
int error = 0, attrflag, dattrflag, ret;
- if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)) != 0)
+ if ((error = VOP_GETATTR(dvp, 0, &vattr, cnp->cn_cred)) != 0)
return (error);
vap->va_type = VDIR;
error = nfsrpc_mkdir(dvp, cnp->cn_nameptr, cnp->cn_namelen,
@@ -2429,7 +2429,7 @@
if (np->n_direofoffset > 0 && uio->uio_offset >= np->n_direofoffset &&
(np->n_flag & NMODIFIED) == 0) {
NFSUNLOCKNODE(np);
- if (VOP_GETATTR(vp, &vattr, ap->a_cred) == 0) {
+ if (VOP_GETATTR(vp, 0, &vattr, ap->a_cred) == 0) {
NFSLOCKNODE(np);
if ((NFS_ISV4(vp) && np->n_change == vattr.va_filerev) ||
!NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime)) {
@@ -3355,14 +3355,14 @@
if ((np->n_flag & NMODIFIED) == 0) {
np->n_attrstamp = 0;
KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp);
- ret = VOP_GETATTR(vp, &va, cred);
+ ret = VOP_GETATTR(vp, 0, &va, cred);
}
if ((np->n_flag & NMODIFIED) || ret ||
np->n_change != va.va_filerev) {
(void) ncl_vinvalbuf(vp, V_SAVE, td, 1);
np->n_attrstamp = 0;
KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp);
- ret = VOP_GETATTR(vp, &va, cred);
+ ret = VOP_GETATTR(vp, 0, &va, cred);
if (!ret) {
np->n_mtime = va.va_mtime;
np->n_change = va.va_filerev;
@@ -3456,7 +3456,7 @@
}
}
vap = &vattr;
- error = VOP_GETATTR(vp, vap, cred);
+ error = VOP_GETATTR(vp, 0, vap, cred);
if (error)
goto out;
error = vaccess(vp->v_type, vap->va_mode, vap->va_uid, vap->va_gid,
@@ -3911,7 +3911,7 @@
must_commit = false;
if (error == 0) {
vap = &VTONFS(invp)->n_vattr.na_vattr;
- error = VOP_GETATTR(invp, vap, ap->a_incred);
+ error = VOP_GETATTR(invp, 0, vap, ap->a_incred);
if (error == 0) {
/*
* Clip "len" at va_size so that RFC compliant servers
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -444,7 +444,7 @@
gotattr = 1;
}
- error = VOP_GETATTR(vp, &nvap->na_vattr, nd->nd_cred);
+ error = VOP_GETATTR(vp, 0, &nvap->na_vattr, nd->nd_cred);
if (lockedit != 0)
NFSVOPUNLOCK(vp);
@@ -568,7 +568,7 @@
if (cred->cr_uid == 0 && (override & NFSACCCHK_ALLOWROOT))
error = 0;
else if (override & NFSACCCHK_ALLOWOWNER) {
- getret = VOP_GETATTR(vp, &vattr, cred);
+ getret = VOP_GETATTR(vp, 0, &vattr, cred);
if (getret == 0 && cred->cr_uid == vattr.va_uid)
error = 0;
}
@@ -3212,7 +3212,7 @@
(mask & ~07777) != 0 || vp == NULL)
nd->nd_repstat = NFSERR_INVAL;
else if (moderet == 0)
- moderet = VOP_GETATTR(vp, &va,
+ moderet = VOP_GETATTR(vp, 0, &va,
nd->nd_cred);
if (moderet == 0)
nvap->na_mode = (mode & mask) |
@@ -4363,7 +4363,7 @@
/* Set extattrs for the DS on the MDS file. */
if (error == 0) {
if (dsa != NULL) {
- error = VOP_GETATTR(nvp, &va, tcred);
+ error = VOP_GETATTR(nvp, 0, &va, tcred);
if (error == 0) {
dsa->dsa_filerev = va.va_filerev;
dsa->dsa_size = va.va_size;
@@ -4488,7 +4488,7 @@
error = nfsvno_getfh(vp, &fh, p);
if (error == 0)
- error = VOP_GETATTR(vp, &va, cred);
+ error = VOP_GETATTR(vp, 0, &va, cred);
if (error == 0) {
/* Set the attributes for "vp" to Setattr the DS vp. */
vauid = va.va_uid;
@@ -4646,7 +4646,7 @@
/* Check to see if this is the last hard link. */
tcred = newnfs_getcred();
- error = VOP_GETATTR(vp, &va, tcred);
+ error = VOP_GETATTR(vp, 0, &va, tcred);
NFSFREECRED(tcred);
if (error != 0) {
printf("pNFS: nfsrv_pnfsremovesetup getattr=%d\n", error);
@@ -6940,7 +6940,7 @@
int ret;
u_short tmode;
- ret = VOP_GETATTR(vp, &nva.na_vattr, cred);
+ ret = VOP_GETATTR(vp, 0, &nva.na_vattr, cred);
if (ret == 0) {
tmode = nva.na_mode;
NFSVNO_ATTRINIT(&nva);
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c
--- a/sys/fs/nfsserver/nfs_nfsdserv.c
+++ b/sys/fs/nfsserver/nfs_nfsdserv.c
@@ -322,7 +322,7 @@
if ((nd->nd_repstat =
NFSVOPLOCK(tvp, LK_SHARED)) == 0) {
nd->nd_repstat = VOP_GETATTR(
- tvp, &va, nd->nd_cred);
+ tvp, 0, &va, nd->nd_cred);
vput(tvp);
} else
vrele(tvp);
diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -8504,7 +8504,7 @@
nfsrv_zeropnfsdat = malloc(PNFSDS_COPYSIZ, M_TEMP,
M_WAITOK | M_ZERO);
rdpos = wrpos = 0;
- ret = VOP_GETATTR(fvp, &va, cred);
+ ret = VOP_GETATTR(fvp, 0, &va, cred);
aresid = 0;
while (ret == 0 && aresid == 0) {
ret = vn_rdwr(UIO_READ, fvp, dat, PNFSDS_COPYSIZ,
@@ -8549,7 +8549,7 @@
/* Set the DS data file's modify time that of the MDS file. */
if (ret == 0)
- ret = VOP_GETATTR(vp, &va, cred);
+ ret = VOP_GETATTR(vp, 0, &va, cred);
if (ret == 0) {
mtime = va.va_mtime;
VATTR_NULL(&va);
@@ -8592,7 +8592,7 @@
int error;
/* Make data file name based on FH. */
- error = VOP_GETATTR(vp, &va, cred);
+ error = VOP_GETATTR(vp, 0, &va, cred);
if (error == 0) {
/* Set the attributes for "vp" to Setattr the DS vp. */
VATTR_NULL(&nva);
diff --git a/sys/fs/p9fs/p9fs_vnops.c b/sys/fs/p9fs/p9fs_vnops.c
--- a/sys/fs/p9fs/p9fs_vnops.c
+++ b/sys/fs/p9fs/p9fs_vnops.c
@@ -316,7 +316,7 @@
vp = *vpp;
/* Check if the entry in cache is stale or not */
if ((p9fs_node_cmp(vp, &newfid->qid) == 0) &&
- ((error = VOP_GETATTR(vp, &vattr, cnp->cn_cred)) == 0)) {
+ ((error = VOP_GETATTR(vp, 0, &vattr, cnp->cn_cred)) == 0)) {
goto out;
}
/*
@@ -333,7 +333,7 @@
} else if (error == ENOENT) {
if (VN_IS_DOOMED(dvp))
goto out;
- if (VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0) {
+ if (VOP_GETATTR(dvp, 0, &vattr, cnp->cn_cred) == 0) {
error = ENOENT;
goto out;
}
@@ -804,7 +804,7 @@
P9_DEBUG(VOPS, "%s: vp %p\n", __func__, vp);
/* make sure getattr is working correctly and is defined.*/
- error = VOP_GETATTR(vp, &vap, cred);
+ error = VOP_GETATTR(vp, 0, &vap, cred);
if (error != 0)
return (error);
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -160,7 +160,7 @@
PFS_TRACE(("%s", pvd->pvd_pn->pn_name));
(void)pvd;
- error = VOP_GETATTR(vn, &vattr, va->a_cred);
+ error = VOP_GETATTR(vn, 0, &vattr, va->a_cred);
if (error)
PFS_RETURN (error);
error = vaccess(vn->v_type, vattr.va_mode, vattr.va_uid, vattr.va_gid,
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c
--- a/sys/fs/smbfs/smbfs_io.c
+++ b/sys/fs/smbfs/smbfs_io.c
@@ -218,12 +218,12 @@
/* biosize = SSTOCN(smp->sm_share)->sc_txmax;*/
if (np->n_flag & NMODIFIED) {
smbfs_attr_cacheremove(vp);
- error = VOP_GETATTR(vp, &vattr, cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cred);
if (error)
return error;
np->n_mtime.tv_sec = vattr.va_mtime.tv_sec;
} else {
- error = VOP_GETATTR(vp, &vattr, cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cred);
if (error)
return error;
if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) {
@@ -274,7 +274,7 @@
* File size can be changed by another client
*/
smbfs_attr_cacheremove(vp);
- error = VOP_GETATTR(vp, &vattr, cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cred);
if (error) return (error);
#endif
uiop->uio_offset = np->n_size;
diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c
--- a/sys/fs/smbfs/smbfs_node.c
+++ b/sys/fs/smbfs/smbfs_node.c
@@ -142,7 +142,7 @@
if (*vpp) {
np = VTOSMB(*vpp);
/* Force cached attributes to be refreshed if stale. */
- (void)VOP_GETATTR(*vpp, &vattr, td->td_ucred);
+ (void)VOP_GETATTR(*vpp, 0, &vattr, td->td_ucred);
/*
* If the file type on the server is inconsistent with
* what it was when we created the vnode, kill the
@@ -306,7 +306,7 @@
smb_makescred(scred, td, cred);
smbfs_vinvalbuf(vp, td);
if (vp->v_type == VREG) {
- VOP_GETATTR(vp, &va, cred);
+ VOP_GETATTR(vp, 0, &va, cred);
smbfs_smb_close(np->n_mount->sm_share, np->n_fid,
&np->n_mtime, scred);
} else if (vp->v_type == VDIR) {
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c
--- a/sys/fs/smbfs/smbfs_vnops.c
+++ b/sys/fs/smbfs/smbfs_vnops.c
@@ -159,12 +159,12 @@
if ((error = smbfs_vinvalbuf(vp, ap->a_td)) == EINTR)
return error;
smbfs_attr_cacheremove(vp);
- error = VOP_GETATTR(vp, &vattr, ap->a_cred);
+ error = VOP_GETATTR(vp, 0, &vattr, ap->a_cred);
if (error)
return error;
np->n_mtime.tv_sec = vattr.va_mtime.tv_sec;
} else {
- error = VOP_GETATTR(vp, &vattr, ap->a_cred);
+ error = VOP_GETATTR(vp, 0, &vattr, ap->a_cred);
if (error)
return error;
if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) {
@@ -415,7 +415,7 @@
if (!error) {
/* error = smbfs_smb_setfattrNT(np, 0,
mtime, atime, scred);
- VOP_GETATTR(vp, &vattr, ap->a_cred); */
+ VOP_GETATTR(vp, 0, &vattr, ap->a_cred); */
if (mtime)
np->n_mtime = *mtime;
VOP_CLOSE(vp, FWRITE, ap->a_cred, td);
@@ -448,7 +448,7 @@
* required attributes.
*/
smbfs_attr_cacheremove(vp); /* invalidate cache */
- VOP_GETATTR(vp, vap, ap->a_cred);
+ VOP_GETATTR(vp, 0, vap, ap->a_cred);
np->n_mtime.tv_sec = vap->va_mtime.tv_sec;
out:
smbfs_free_scred(scred);
@@ -507,7 +507,7 @@
*vpp = NULL;
if (vap->va_type != VREG)
return EOPNOTSUPP;
- if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)))
+ if ((error = VOP_GETATTR(dvp, 0, &vattr, cnp->cn_cred)))
return error;
scred = smbfs_malloc_scred();
smb_makescred(scred, curthread, cnp->cn_cred);
@@ -687,7 +687,7 @@
int len = cnp->cn_namelen;
int error;
- if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred))) {
+ if ((error = VOP_GETATTR(dvp, 0, &vattr, cnp->cn_cred))) {
return error;
}
if ((name[0] == '.') && ((len == 1) || ((len == 2) && (name[1] == '.'))))
@@ -869,7 +869,7 @@
error = VOP_ACCESS(vp, VREAD, cred, td);
if (error)
return error;
- error = VOP_GETATTR(vp, &vattr, cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cred);
if (error)
return error;
if (strcmp(name, "dosattr") == 0) {
@@ -1088,7 +1088,7 @@
killit = 0;
vp = *vpp;
- error = VOP_GETATTR(vp, &vattr, cnp->cn_cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cnp->cn_cred);
/*
* If the file type on the server is inconsistent
* with what it was when we created the vnode,
diff --git a/sys/fs/tarfs/tarfs_io.c b/sys/fs/tarfs/tarfs_io.c
--- a/sys/fs/tarfs/tarfs_io.c
+++ b/sys/fs/tarfs/tarfs_io.c
@@ -287,7 +287,7 @@
VATTR_NULL(vap);
error = vn_lock(tmp->vp, LK_SHARED);
if (error == 0) {
- error = VOP_GETATTR(tmp->vp, &va, ap->a_cred);
+ error = VOP_GETATTR(tmp->vp, 0, &va, ap->a_cred);
VOP_UNLOCK(tmp->vp);
if (error == 0) {
vap->va_type = VREG;
diff --git a/sys/fs/tarfs/tarfs_vfsops.c b/sys/fs/tarfs/tarfs_vfsops.c
--- a/sys/fs/tarfs/tarfs_vfsops.c
+++ b/sys/fs/tarfs/tarfs_vfsops.c
@@ -874,7 +874,7 @@
__func__, vp);
/* Get source metadata */
- error = VOP_GETATTR(vp, &va, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, &va, td->td_ucred);
if (error != 0) {
return (error);
}
@@ -952,7 +952,7 @@
return (EINVAL);
vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY);
- error = VOP_GETATTR(mp->mnt_vnodecovered, &va, mp->mnt_cred);
+ error = VOP_GETATTR(mp->mnt_vnodecovered, 0, &va, mp->mnt_cred);
VOP_UNLOCK(mp->mnt_vnodecovered);
if (error)
return (error);
diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c
--- a/sys/fs/tmpfs/tmpfs_vfsops.c
+++ b/sys/fs/tmpfs/tmpfs_vfsops.c
@@ -385,7 +385,7 @@
}
vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY);
- error = VOP_GETATTR(mp->mnt_vnodecovered, &va, mp->mnt_cred);
+ error = VOP_GETATTR(mp->mnt_vnodecovered, 0, &va, mp->mnt_cred);
VOP_UNLOCK(mp->mnt_vnodecovered);
if (error)
return (error);
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c
--- a/sys/fs/unionfs/union_subr.c
+++ b/sys/fs/unionfs/union_subr.c
@@ -697,7 +697,7 @@
struct vattr lva;
int error;
- if ((error = VOP_GETATTR(lvp, &lva, cred)))
+ if ((error = VOP_GETATTR(lvp, 0, &lva, cred)))
return (error);
unionfs_create_uppervattr_core(ump, &lva, uva, td);
@@ -934,7 +934,7 @@
memset(&nd.ni_cnd, 0, sizeof(struct componentname));
NDPREINIT(&nd);
- if ((error = VOP_GETATTR(lvp, &lva, cnp->cn_cred)))
+ if ((error = VOP_GETATTR(lvp, 0, &lva, cnp->cn_cred)))
goto unionfs_mkshadowdir_finish;
vref(udvp);
@@ -1293,7 +1293,7 @@
fmode = FFLAGS(O_WRONLY | O_CREAT | O_TRUNC | O_EXCL);
error = 0;
- if ((error = VOP_GETATTR(lvp, &lva, cred)) != 0)
+ if ((error = VOP_GETATTR(lvp, 0, &lva, cred)) != 0)
return (error);
unionfs_create_uppervattr_core(ump, &lva, uvap, td);
@@ -1582,7 +1582,7 @@
ASSERT_VOP_LOCKED(lvp, __func__);
ASSERT_VOP_ELOCKED(uvp, __func__);
- if ((error = VOP_GETATTR(uvp, &va, cred)) != 0)
+ if ((error = VOP_GETATTR(uvp, 0, &va, cred)) != 0)
return (error);
if (va.va_flags & OPAQUE)
return (0);
@@ -1595,7 +1595,7 @@
return (error);
if ((error = VOP_OPEN(lvp, FREAD, cred, td, NULL)) != 0)
return (error);
- if ((error = VOP_GETATTR(lvp, &va, cred)) != 0)
+ if ((error = VOP_GETATTR(lvp, 0, &va, cred)) != 0)
return (error);
dirbuflen = max(DEV_BSIZE, GENERIC_MAXDIRSIZ);
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -152,7 +152,7 @@
ufile = udir;
vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY);
- error = VOP_GETATTR(mp->mnt_vnodecovered, &va, mp->mnt_cred);
+ error = VOP_GETATTR(mp->mnt_vnodecovered, 0, &va, mp->mnt_cred);
if (!error) {
if (udir == 0)
udir = va.va_mode;
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -283,7 +283,7 @@
if ((uerror == ENOENT || uerror == EJUSTRETURN) &&
(cnp->cn_flags & ISWHITEOUT))
iswhiteout = true;
- else if (VOP_GETATTR(udvp, &va, cnp->cn_cred) == 0 &&
+ else if (VOP_GETATTR(udvp, 0, &va, cnp->cn_cred) == 0 &&
(va.va_flags & OPAQUE))
iswhiteout = true;
@@ -1024,7 +1024,7 @@
td = curthread;
if (uvp != NULLVP) {
- if ((error = VOP_GETATTR(uvp, ap->a_vap, ap->a_cred)) == 0)
+ if ((error = VOP_GETATTR(uvp, 0, ap->a_vap, ap->a_cred)) == 0)
ap->a_vap->va_fsid =
ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
@@ -1036,7 +1036,7 @@
return (error);
}
- error = VOP_GETATTR(lvp, ap->a_vap, ap->a_cred);
+ error = VOP_GETATTR(lvp, 0, ap->a_vap, ap->a_cred);
if (error == 0 && (ump->um_uppermp->mnt_flag & MNT_RDONLY) == 0) {
/* correct the attr toward shadow file/dir. */
@@ -1626,7 +1626,7 @@
if (udvp != NULLVP) {
/* check opaque */
if (!(cnp->cn_flags & ISWHITEOUT)) {
- error = VOP_GETATTR(udvp, &va, cnp->cn_cred);
+ error = VOP_GETATTR(udvp, 0, &va, cnp->cn_cred);
if (error != 0)
goto unionfs_mkdir_cleanup;
if ((va.va_flags & OPAQUE) != 0)
@@ -1863,7 +1863,7 @@
/* check opaque */
if (uvp != NULLVP && lvp != NULLVP) {
- if ((error = VOP_GETATTR(uvp, &va, ap->a_cred)) != 0)
+ if ((error = VOP_GETATTR(uvp, 0, &va, ap->a_cred)) != 0)
goto unionfs_readdir_exit;
if (va.va_flags & OPAQUE)
lvp = NULLVP;
diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c
--- a/sys/kern/imgact_shell.c
+++ b/sys/kern/imgact_shell.c
@@ -124,7 +124,7 @@
* valid -- the actual file might be much shorter than the page.
* So find out the file size.
*/
- error = VOP_GETATTR(imgp->vp, &vattr, imgp->proc->p_ucred);
+ error = VOP_GETATTR(imgp->vp, 0, &vattr, imgp->proc->p_ucred);
if (error)
return (error);
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1827,7 +1827,7 @@
td = curthread;
/* Get file attributes */
- error = VOP_GETATTR(vp, attr, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, attr, td->td_ucred);
if (error)
return (error);
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -1968,7 +1968,7 @@
NDFREE_PNBUF(&nd);
type = nd.ni_vp->v_type;
if (vap)
- VOP_GETATTR(nd.ni_vp, vap, td->td_ucred);
+ VOP_GETATTR(nd.ni_vp, 0, vap, td->td_ucred);
VOP_UNLOCK(nd.ni_vp);
vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
if (type == VREG)
@@ -2020,7 +2020,7 @@
if (nd.ni_vp->v_type != VREG)
goto bad;
best = cp = NULL;
- error = VOP_GETATTR(nd.ni_vp, &vattr, cred);
+ error = VOP_GETATTR(nd.ni_vp, 0, &vattr, cred);
if (error)
goto bad;
/*
diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c
--- a/sys/kern/kern_lockf.c
+++ b/sys/kern/kern_lockf.c
@@ -2522,7 +2522,7 @@
if (gerror == 0 && vn_lock(vp, LK_SHARED) == 0) {
error = prison_canseemount(ucred, vp->v_mount);
if (error == 0)
- error = VOP_STAT(vp, &stt, ucred, NOCRED);
+ error = VOP_STAT(vp, &stt, 0, ucred, NOCRED);
VOP_UNLOCK(vp);
if (error == 0) {
klf->kl.kl_file_fsid = stt.st_dev;
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -2490,7 +2490,7 @@
vn_fullpath(vp, &fullpath, &freepath);
cred = curthread->td_ucred;
vn_lock(vp, LK_SHARED | LK_RETRY);
- if (VOP_GETATTR(vp, &va, cred) == 0) {
+ if (VOP_GETATTR(vp, 0, &va, cred) == 0) {
kve->kve_fileid = va.va_fileid;
/* truncate */
kve->kve_fsid = va.va_fsid;
@@ -2710,7 +2710,7 @@
kve->kve_vn_type = vntype_to_kinfo(vp->v_type);
cred = curthread->td_ucred;
vn_lock(vp, LK_SHARED | LK_RETRY);
- if (VOP_GETATTR(vp, &va, cred) == 0) {
+ if (VOP_GETATTR(vp, 0, &va, cred) == 0) {
kve->kve_vn_fileid = va.va_fileid;
kve->kve_vn_fsid = va.va_fsid;
kve->kve_vn_fsid_freebsd11 =
diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c
--- a/sys/kern/kern_sendfile.c
+++ b/sys/kern/kern_sendfile.c
@@ -869,7 +869,7 @@
nobj_size = obj->un_pager.vnp.vnp_size;
VM_OBJECT_RUNLOCK(obj);
} else {
- error = VOP_GETATTR(vp, &va, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, &va, td->td_ucred);
if (error != 0) {
VOP_UNLOCK(vp);
goto done;
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -3871,7 +3871,7 @@
break;
}
- error = VOP_GETATTR(vp, &vattr, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, &vattr, td->td_ucred);
if (error != 0) {
vnode_close_locked(td, vp);
break;
@@ -4110,7 +4110,7 @@
* Don't dump to non-regular files or files with links.
* Do not dump into system files. Effective user must own the corefile.
*/
- if (vp->v_type != VREG || VOP_GETATTR(vp, &vattr, cred) != 0 ||
+ if (vp->v_type != VREG || VOP_GETATTR(vp, 0, &vattr, cred) != 0 ||
vattr.va_nlink != 1 || (vp->v_vflag & VV_SYSTEM) != 0 ||
vattr.va_uid != cred->cr_uid) {
VOP_UNLOCK(vp);
diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c
--- a/sys/kern/subr_firmware.c
+++ b/sys/kern/subr_firmware.c
@@ -302,7 +302,7 @@
NDFREE_PNBUF(&nd);
if (nd.ni_vp->v_type != VREG)
goto err2;
- error = VOP_GETATTR(nd.ni_vp, &vattr, cred);
+ error = VOP_GETATTR(nd.ni_vp, 0, &vattr, cred);
if (error)
goto err2;
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -546,7 +546,7 @@
fullpath = NULL;
vn_fullpath(vp, &fullpath, &freepath);
vn_lock(vp, LK_SHARED | LK_RETRY);
- if (VOP_GETATTR(vp, &vattr, td->td_ucred) == 0) {
+ if (VOP_GETATTR(vp, 0, &vattr, td->td_ucred) == 0) {
pve->pve_fileid = vattr.va_fileid;
pve->pve_fsid = vattr.va_fsid;
}
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -1173,7 +1173,7 @@
struct vattr vattr;
int error;
- error = VOP_GETATTR(vp, &vattr, ap->a_cred);
+ error = VOP_GETATTR(vp, 0, &vattr, ap->a_cred);
if (error)
return (error);
error = vaccess(vp->v_type, vattr.va_mode, vattr.va_uid, vattr.va_gid,
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -291,7 +291,7 @@
ASSERT_VOP_LOCKED(vp, "vnode not locked");
KASSERT(vp->v_type == VDIR, ("vp %p is not a directory", vp));
- error = VOP_GETATTR(vp, &va, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, &va, td->td_ucred);
if (error != 0)
return (error);
@@ -385,7 +385,7 @@
* only required for the SEEK_END case.
*/
vn_lock(vp, LK_SHARED | LK_RETRY);
- error = VOP_GETATTR(vp, &vattr, curthread->td_ucred);
+ error = VOP_GETATTR(vp, 0, &vattr, curthread->td_ucred);
VOP_UNLOCK(vp);
if (error)
return (error);
@@ -406,7 +406,7 @@
if (ap->a_fl->l_whence == SEEK_END) {
/* The size argument is only needed for SEEK_END. */
vn_lock(vp, LK_SHARED | LK_RETRY);
- error = VOP_GETATTR(vp, &vattr, curthread->td_ucred);
+ error = VOP_GETATTR(vp, 0, &vattr, curthread->td_ucred);
VOP_UNLOCK(vp);
if (error)
return (error);
@@ -697,7 +697,7 @@
if (vp->v_type != VDIR)
return (ENOENT);
- error = VOP_GETATTR(vp, &va, cred);
+ error = VOP_GETATTR(vp, 0, &va, cred);
if (error)
return (error);
@@ -828,7 +828,7 @@
len = *ap->a_len;
offset = *ap->a_offset;
- error = VOP_GETATTR(vp, vap, ap->a_cred);
+ error = VOP_GETATTR(vp, 0, vap, ap->a_cred);
if (error != 0)
goto out;
fsize = vap->va_size;
@@ -1004,7 +1004,7 @@
offset = *ap->a_offset;
cred = ap->a_cred;
- error = VOP_GETATTR(vp, &va, cred);
+ error = VOP_GETATTR(vp, 0, &va, cred);
if (error)
return (error);
@@ -1319,7 +1319,7 @@
if (error != 0)
return (EBADF);
if (vp->v_type == VREG)
- error = VOP_GETATTR(vp, &va, ap->a_cred);
+ error = VOP_GETATTR(vp, 0, &va, ap->a_cred);
else
error = ENOTTY;
if (error == 0) {
@@ -1512,7 +1512,7 @@
vap->va_gen = 0;
vap->va_rdev = NODEV;
- error = VOP_GETATTR(vp, vap, a->a_active_cred);
+ error = VOP_GETATTR(vp, a->a_flags, vap, a->a_active_cred);
if (error)
goto out;
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1139,7 +1139,7 @@
* If the user is not root, ensure that they own the directory
* onto which we are attempting to mount.
*/
- error = VOP_GETATTR(vp, &va, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, &va, td->td_ucred);
if (error == 0 && va.va_uid != td->td_ucred->cr_uid)
error = priv_check_cred(td->td_ucred, PRIV_VFS_ADMIN);
if (error == 0)
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -4197,7 +4197,7 @@
MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp);
return (error);
}
- error = VOP_GETATTR(vp, &vattr, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, &vattr, td->td_ucred);
VI_LOCK(vp);
if ((vp->v_type == VNON ||
@@ -7323,7 +7323,7 @@
int error;
ASSERT_VOP_LOCKED(vp, __func__);
- error = VOP_GETATTR(vp, &vattr, cred);
+ error = VOP_GETATTR(vp, 0, &vattr, cred);
if (__predict_true(error == 0)) {
if (vattr.va_size <= OFF_MAX)
*size = vattr.va_size;
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1585,7 +1585,7 @@
if (!hardlink_check_uid && !hardlink_check_gid)
return (0);
- error = VOP_GETATTR(vp, &va, cred);
+ error = VOP_GETATTR(vp, 0, &va, cred);
if (error != 0)
return (error);
@@ -1957,7 +1957,7 @@
if (vp->v_type == VDIR && oldinum == 0) {
error = EPERM; /* POSIX */
} else if (oldinum != 0 &&
- ((error = VOP_STAT(vp, &sb, td->td_ucred, NOCRED)) == 0) &&
+ ((error = VOP_STAT(vp, &sb, 0, td->td_ucred, NOCRED)) == 0) &&
sb.st_ino != oldinum) {
error = EIDRM; /* Identifier removed */
} else if (fp != NULL && fp->f_vnode != vp) {
@@ -2475,7 +2475,7 @@
error = kern_fstat(td, fd, sbp);
return (error);
}
- error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED);
+ error = VOP_STAT(nd.ni_vp, sbp, 0, td->td_ucred, NOCRED);
NDFREE_PNBUF(&nd);
vput(nd.ni_vp);
#ifdef __STAT_TIME_T_EXT
@@ -3224,7 +3224,7 @@
if ((error = vn_start_write(vp, &mp, V_WAIT | V_PCATCH)) != 0)
return (error);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
- if (numtimes < 3 && VOP_GETATTR(vp, &vattr, td->td_ucred) == 0 &&
+ if (numtimes < 3 && VOP_GETATTR(vp, 0, &vattr, td->td_ucred) == 0 &&
timespeccmp(&ts[1], &vattr.va_birthtime, < ))
setbirthtime = true;
VATTR_NULL(&vattr);
@@ -4304,7 +4304,7 @@
if (error != 0)
goto out;
#endif
- error = VOP_GETATTR(vp, &vattr, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, &vattr, td->td_ucred);
if (error != 0)
goto out;
if (td->td_ucred->cr_uid != vattr.va_uid) {
@@ -4696,7 +4696,7 @@
vfs_unbusy(mp);
if (error != 0)
return (error);
- error = VOP_STAT(vp, sb, td->td_ucred, NOCRED);
+ error = VOP_STAT(vp, sb, 0, td->td_ucred, NOCRED);
vput(vp);
return (error);
}
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1696,7 +1696,7 @@
int error;
vn_lock(vp, LK_SHARED | LK_RETRY);
- error = VOP_STAT(vp, sb, active_cred, fp->f_cred);
+ error = VOP_STAT(vp, sb, 0, active_cred, fp->f_cred);
VOP_UNLOCK(vp);
return (error);
@@ -2814,7 +2814,7 @@
va.va_fsid = VNOVAL;
va.va_rdev = NODEV;
vn_lock(vp, LK_SHARED | LK_RETRY);
- error = VOP_GETATTR(vp, &va, curthread->td_ucred);
+ error = VOP_GETATTR(vp, 0, &va, curthread->td_ucred);
VOP_UNLOCK(vp);
if (error != 0)
return (error);
@@ -3361,7 +3361,7 @@
goto out;
if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0)
holein = 0;
- error = VOP_GETATTR(invp, &inva, incred);
+ error = VOP_GETATTR(invp, 0, &inva, incred);
if (error == 0 && inva.va_size > OFF_MAX)
error = EFBIG;
VOP_UNLOCK(invp);
@@ -4017,7 +4017,7 @@
ASSERT_VOP_LOCKED(vp, "vfs_emptydir");
VNPASS(vp->v_type == VDIR, vp);
- error = VOP_GETATTR(vp, &va, td->td_ucred);
+ error = VOP_GETATTR(vp, 0, &va, td->td_ucred);
if (error != 0)
return (error);
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -187,6 +187,7 @@
vop_stat {
IN struct vnode *vp;
OUT struct stat *sb;
+ IN int flags;
IN struct ucred *active_cred;
IN struct ucred *file_cred;
};
@@ -196,6 +197,7 @@
vop_getattr {
IN struct vnode *vp;
+ IN int flags;
OUT struct vattr *vap;
IN struct ucred *cred;
};
diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c
--- a/sys/security/mac_bsdextended/mac_bsdextended.c
+++ b/sys/security/mac_bsdextended/mac_bsdextended.c
@@ -457,7 +457,7 @@
if (!ugidfw_enabled)
return (0);
- error = VOP_GETATTR(vp, &vap, cred);
+ error = VOP_GETATTR(vp, 0, &vap, cred);
if (error)
return (error);
return (ugidfw_check(cred, vp, &vap, acc_mode));
diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c
--- a/sys/security/mac_lomac/mac_lomac.c
+++ b/sys/security/mac_lomac/mac_lomac.c
@@ -554,7 +554,7 @@
objlabeltext = sbuf_data(&objlabel_sb);
pgid = p->p_pgrp->pg_id; /* XXX could be stale? */
- if (vp != NULL && VOP_GETATTR(vp, &va, curthread->td_ucred) == 0) {
+ if (vp != NULL && VOP_GETATTR(vp, 0, &va, curthread->td_ucred) == 0) {
log(LOG_INFO, "LOMAC: level-%s subject p%dg%du%d:%s demoted to"
" level %s after %s a level-%s %s (inode=%ju, "
"mountpount=%s)\n",
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -617,6 +617,8 @@
#define COPY_FILE_RANGE_KFLAGS 0xff000000
#define COPY_FILE_RANGE_TIMEO1SEC 0x01000000 /* Return after 1sec. */
+/* VOP_STAT()/VOP_GETATTR() flags */
+
/*
* Public vnode manipulation functions.
*/
@@ -1007,7 +1009,7 @@
\
osize = ooffset = noffset = 0; \
if (!VN_KNLIST_EMPTY((ap)->a_vp)) { \
- error = VOP_GETATTR((ap)->a_vp, &va, (ap)->a_cred); \
+ error = VOP_GETATTR((ap)->a_vp, 0, &va, (ap)->a_cred); \
if (error) \
return (error); \
ooffset = (ap)->a_uio->uio_offset; \
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -581,7 +581,7 @@
if (snapdebug)
vn_printf(xvp, "ffs_snapshot: busy vnode ");
#endif
- if (VOP_GETATTR(xvp, &vat, td->td_ucred) == 0 &&
+ if (VOP_GETATTR(xvp, 0, &vat, td->td_ucred) == 0 &&
vat.va_nlink > 0) {
VOP_UNLOCK(xvp);
vdrop(xvp);
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -2466,7 +2466,7 @@
error = swapongeom(vp);
} else if (vp->v_type == VREG &&
(vp->v_mount->mnt_vfc->vfc_flags & VFCF_NETWORK) != 0 &&
- (error = VOP_GETATTR(vp, &attr, td->td_ucred)) == 0) {
+ (error = VOP_GETATTR(vp, 0, &attr, td->td_ucred)) == 0) {
/*
* Allow direct swapping to NFS regular files in the same
* way that nfs_mountroot() sets up diskless swapping.
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -1294,7 +1294,7 @@
error = EINVAL;
goto done;
}
- if ((error = VOP_GETATTR(vp, &va, cred)))
+ if ((error = VOP_GETATTR(vp, 0, &va, cred)))
goto done;
#ifdef MAC
/* This relies on VM_PROT_* matching PROT_*. */
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -2593,7 +2593,7 @@
if (vp != NULL) {
vn_fullpath(vp, &fullpath, &freepath);
vn_lock(vp, LK_SHARED | LK_RETRY);
- if (VOP_GETATTR(vp, &va, curthread->td_ucred) == 0) {
+ if (VOP_GETATTR(vp, 0, &va, curthread->td_ucred) == 0) {
kvo->kvo_vn_fileid = va.va_fileid;
kvo->kvo_vn_fsid = va.va_fsid;
kvo->kvo_vn_fsid_freebsd11 = va.va_fsid;

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 21, 12:45 PM (1 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12380301
Default Alt Text
D46709.diff (36 KB)

Event Timeline