Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operation
argument from being file descriptor index into the pointer to struct file: part 2. Convert calls missed in the first big commit. Noted by: rwatson Pointy hat to: kib
This commit is contained in:
parent
e1070b644c
commit
7a31868ed0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170183
@ -524,7 +524,7 @@ nwfs_putpages(ap)
|
||||
#ifndef NWFS_RWCACHE
|
||||
td = curthread; /* XXX */
|
||||
cred = td->td_ucred; /* XXX */
|
||||
VOP_OPEN(vp, FWRITE, cred, td, -1);
|
||||
VOP_OPEN(vp, FWRITE, cred, td, NULL);
|
||||
error = vop_stdputpages(ap);
|
||||
VOP_CLOSE(vp, FWRITE, cred, td);
|
||||
return error;
|
||||
@ -541,7 +541,7 @@ nwfs_putpages(ap)
|
||||
|
||||
td = curthread; /* XXX */
|
||||
cred = td->td_ucred; /* XXX */
|
||||
/* VOP_OPEN(vp, FWRITE, cred, td, -1);*/
|
||||
/* VOP_OPEN(vp, FWRITE, cred, td, NULL);*/
|
||||
np = VTONW(vp);
|
||||
nmp = VFSTONWFS(vp->v_mount);
|
||||
pages = ap->a_m;
|
||||
|
@ -592,7 +592,7 @@ smbfs_putpages(ap)
|
||||
#ifdef SMBFS_RWGENERIC
|
||||
td = curthread; /* XXX */
|
||||
cred = td->td_ucred; /* XXX */
|
||||
VOP_OPEN(vp, FWRITE, cred, td, -1);
|
||||
VOP_OPEN(vp, FWRITE, cred, td, NULL);
|
||||
error = vop_stdputpages(ap);
|
||||
VOP_CLOSE(vp, FWRITE, cred, td);
|
||||
return error;
|
||||
@ -610,7 +610,7 @@ smbfs_putpages(ap)
|
||||
|
||||
td = curthread; /* XXX */
|
||||
cred = td->td_ucred; /* XXX */
|
||||
/* VOP_OPEN(vp, FWRITE, cred, td, -1);*/
|
||||
/* VOP_OPEN(vp, FWRITE, cred, td, NULL);*/
|
||||
np = VTOSMB(vp);
|
||||
smp = VFSTOSMBFS(vp->v_mount);
|
||||
pages = ap->a_m;
|
||||
|
@ -457,7 +457,7 @@ reiserfs_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td)
|
||||
* Open the device in read-only, 'cause we don't support write
|
||||
* for now
|
||||
*/
|
||||
error = VOP_OPEN(devvp, FREAD, FSCRED, td, -1);
|
||||
error = VOP_OPEN(devvp, FREAD, FSCRED, td, NULL);
|
||||
VOP_UNLOCK(devvp, 0, td);
|
||||
if (error)
|
||||
return (error);
|
||||
|
@ -356,7 +356,7 @@ alq_open(struct alq **alqp, const char *file, struct ucred *cred, int cmode,
|
||||
NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, file, td);
|
||||
flags = FWRITE | O_NOFOLLOW | O_CREAT;
|
||||
|
||||
error = vn_open_cred(&nd, &flags, cmode, cred, -1);
|
||||
error = vn_open_cred(&nd, &flags, cmode, cred, NULL);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
|
@ -646,7 +646,7 @@ auditctl(struct thread *td, struct auditctl_args *uap)
|
||||
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1,
|
||||
UIO_USERSPACE, uap->path, td);
|
||||
flags = AUDIT_OPEN_FLAGS;
|
||||
error = vn_open(&nd, &flags, 0, -1);
|
||||
error = vn_open(&nd, &flags, 0, NULL);
|
||||
if (error)
|
||||
return (error);
|
||||
vfslocked = NDHASGIANT(&nd);
|
||||
|
@ -321,7 +321,7 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp,
|
||||
{
|
||||
int error;
|
||||
|
||||
error = VOP_OPEN(vp, FREAD|FWRITE, td->td_ucred, td, -1);
|
||||
error = VOP_OPEN(vp, FREAD|FWRITE, td->td_ucred, td, NULL);
|
||||
if (error) {
|
||||
printf("ufs_extattr_enable_with_open.VOP_OPEN(): failed "
|
||||
"with %d\n", error);
|
||||
|
Loading…
Reference in New Issue
Block a user