summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/smbfs')
-rw-r--r--sys/fs/smbfs/smbfs_io.c6
-rw-r--r--sys/fs/smbfs/smbfs_node.c2
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c8
-rw-r--r--sys/fs/smbfs/smbfs_vnops.c3
4 files changed, 9 insertions, 10 deletions
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c
index c7d337e..62290be 100644
--- a/sys/fs/smbfs/smbfs_io.c
+++ b/sys/fs/smbfs/smbfs_io.c
@@ -429,7 +429,7 @@ smbfs_getpages(ap)
vp = ap->a_vp;
td = curthread; /* XXX */
- cred = td->td_proc->p_ucred; /* XXX */
+ cred = td->td_ucred; /* XXX */
np = VTOSMB(vp);
smp = VFSTOSMBFS(vp->v_mount);
pages = ap->a_m;
@@ -549,7 +549,7 @@ smbfs_putpages(ap)
#ifdef SMBFS_RWGENERIC
td = curthread; /* XXX */
- cred = td->td_proc->p_ucred; /* XXX */
+ cred = td->td_ucred; /* XXX */
VOP_OPEN(vp, FWRITE, cred, td);
error = vop_stdputpages(ap);
VOP_CLOSE(vp, FWRITE, cred, td);
@@ -567,7 +567,7 @@ smbfs_putpages(ap)
vm_page_t *pages;
td = curthread; /* XXX */
- cred = td->td_proc->p_ucred; /* XXX */
+ cred = td->td_ucred; /* XXX */
/* VOP_OPEN(vp, FWRITE, cred, td);*/
np = VTOSMB(vp);
smp = VFSTOSMBFS(vp->v_mount);
diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c
index f170b1d..8dabd00 100644
--- a/sys/fs/smbfs/smbfs_node.c
+++ b/sys/fs/smbfs/smbfs_node.c
@@ -337,7 +337,7 @@ smbfs_inactive(ap)
} */ *ap;
{
struct thread *td = ap->a_td;
- struct ucred *cred = td->td_proc->p_ucred;
+ struct ucred *cred = td->td_ucred;
struct vnode *vp = ap->a_vp;
struct smbnode *np = VTOSMB(vp);
struct smb_cred scred;
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index eff50e3..b3b5cd3 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -166,7 +166,7 @@ smbfs_mount(struct mount *mp, char *path, caddr_t data,
SMBFS_VERSION, args.version);
return EINVAL;
}
- smb_makescred(&scred, td, td->td_proc->p_ucred);
+ smb_makescred(&scred, td, td->td_ucred);
error = smb_dev2share(args.dev, SMBM_EXEC, &scred, &ssp);
if (error) {
printf("invalid device handle %d (%d)\n", args.dev, error);
@@ -267,7 +267,7 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td)
error = vflush(mp, 1, flags);
if (error)
return error;
- smb_makescred(&scred, td, td->td_proc->p_ucred);
+ smb_makescred(&scred, td, td->td_ucred);
smb_share_put(smp->sm_share, &scred);
mp->mnt_data = (qaddr_t)0;
@@ -294,7 +294,7 @@ smbfs_root(struct mount *mp, struct vnode **vpp)
struct smbnode *np;
struct smbfattr fattr;
struct thread *td = curthread;
- struct ucred *cred = td->td_proc->p_ucred;
+ struct ucred *cred = td->td_ucred;
struct smb_cred scred;
int error;
@@ -399,7 +399,7 @@ smbfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
sbp->f_iosize = SSTOVC(ssp)->vc_txmax; /* optimal transfer block size */
sbp->f_spare2 = 0; /* placeholder */
- smb_makescred(&scred, td, td->td_proc->p_ucred);
+ smb_makescred(&scred, td, td->td_ucred);
if (SMB_DIALECT(SSTOVC(ssp)) >= SMB_DIALECT_LANMAN2_0)
error = smbfs_smb_statfs2(ssp, sbp, &scred);
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c
index 392468e..d01dc42 100644
--- a/sys/fs/smbfs/smbfs_vnops.c
+++ b/sys/fs/smbfs/smbfs_vnops.c
@@ -976,7 +976,6 @@ smbfs_advlock(ap)
caddr_t id = (caddr_t)1 /* ap->a_id */;
/* int flags = ap->a_flags;*/
struct thread *td = curthread;
- struct proc *p = td ? td->td_proc : NULL;
struct smb_cred scred;
u_quad_t size;
off_t start, end, oadd;
@@ -1027,7 +1026,7 @@ smbfs_advlock(ap)
return EOVERFLOW;
end = start + oadd;
}
- smb_makescred(&scred, td, p ? p->p_ucred : NULL);
+ smb_makescred(&scred, td, td->td_ucred);
switch (ap->a_op) {
case F_SETLK:
switch (fl->l_type) {
OpenPOWER on IntegriCloud