Do not use casts (int *)0 and (struct thread *)0 for the arguments of
vn_rdwr, use NULL. Reviewed by: jhb MFC after: 1 week
This commit is contained in:
parent
38a9df71f9
commit
01ed174831
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194296
@ -1048,8 +1048,8 @@ ext2_checkpath(source, target, cred)
|
||||
}
|
||||
error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
|
||||
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
|
||||
IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, (int *)0,
|
||||
(struct thread *)0);
|
||||
IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, NULL,
|
||||
NULL);
|
||||
if (error != 0)
|
||||
break;
|
||||
namlen = dirbuf.dotdot_type; /* like ufs little-endian */
|
||||
|
@ -1048,8 +1048,7 @@ ext2_rename(ap)
|
||||
error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf,
|
||||
sizeof (struct dirtemplate), (off_t)0,
|
||||
UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
|
||||
tcnp->cn_cred, NOCRED, (int *)0,
|
||||
(struct thread *)0);
|
||||
tcnp->cn_cred, NOCRED, NULL, NULL);
|
||||
if (error == 0) {
|
||||
/* Like ufs little-endian: */
|
||||
namlen = dirbuf.dotdot_type;
|
||||
@ -1066,8 +1065,7 @@ ext2_rename(ap)
|
||||
(off_t)0, UIO_SYSSPACE,
|
||||
IO_NODELOCKED | IO_SYNC |
|
||||
IO_NOMACCHECK, tcnp->cn_cred,
|
||||
NOCRED, (int *)0,
|
||||
(struct thread *)0);
|
||||
NOCRED, NULL, NULL);
|
||||
cache_purge(fdvp);
|
||||
}
|
||||
}
|
||||
@ -1203,7 +1201,7 @@ ext2_mkdir(ap)
|
||||
error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate,
|
||||
sizeof (dirtemplate), (off_t)0, UIO_SYSSPACE,
|
||||
IO_NODELOCKED | IO_SYNC | IO_NOMACCHECK, cnp->cn_cred, NOCRED,
|
||||
(int *)0, (struct thread *)0);
|
||||
NULL, NULL);
|
||||
if (error) {
|
||||
dp->i_nlink--;
|
||||
dp->i_flag |= IN_CHANGE;
|
||||
@ -1340,7 +1338,7 @@ ext2_symlink(ap)
|
||||
} else
|
||||
error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
|
||||
UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
|
||||
ap->a_cnp->cn_cred, NOCRED, (int *)0, (struct thread *)0);
|
||||
ap->a_cnp->cn_cred, NOCRED, NULL, NULL);
|
||||
if (error)
|
||||
vput(vp);
|
||||
return (error);
|
||||
|
@ -436,7 +436,7 @@ acct_process(struct thread *td)
|
||||
vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount);
|
||||
ret = vn_rdwr(UIO_WRITE, acct_vp, (caddr_t)&acct, sizeof (acct),
|
||||
(off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, acct_cred, NOCRED,
|
||||
(int *)0, td);
|
||||
NULL, td);
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
sx_sunlock(&acct_sx);
|
||||
return (ret);
|
||||
|
@ -1247,7 +1247,7 @@ ufs_dir_dd_ino(struct vnode *vp, struct ucred *cred, ino_t *dd_ino)
|
||||
return (ENOTDIR);
|
||||
error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
|
||||
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
|
||||
IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, (int *)0, NULL);
|
||||
IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
#if (BYTE_ORDER == LITTLE_ENDIAN)
|
||||
|
@ -1849,7 +1849,7 @@ ufs_symlink(ap)
|
||||
} else
|
||||
error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
|
||||
UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
|
||||
ap->a_cnp->cn_cred, NOCRED, (int *)0, (struct thread *)0);
|
||||
ap->a_cnp->cn_cred, NOCRED, NULL, NULL);
|
||||
if (error)
|
||||
vput(vp);
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user