summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs/smbfs_vfsops.c
diff options
context:
space:
mode:
authorbp <bp@FreeBSD.org>2001-12-02 08:56:58 +0000
committerbp <bp@FreeBSD.org>2001-12-02 08:56:58 +0000
commitf4a7e7e6df16c0767a7e49a10aa2936281fff186 (patch)
tree8703bd134c36d644379a45f2ec0f1f5765d1a4f4 /sys/fs/smbfs/smbfs_vfsops.c
parentf97547e246f3c4f9f272892fa757d7df8dc90b89 (diff)
downloadFreeBSD-src-f4a7e7e6df16c0767a7e49a10aa2936281fff186.zip
FreeBSD-src-f4a7e7e6df16c0767a7e49a10aa2936281fff186.tar.gz
Catch up with KSE changes.
Submitted by: Max Khon <fjoe@iclub.nsu.ru>
Diffstat (limited to 'sys/fs/smbfs/smbfs_vfsops.c')
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index d06f7bf..3a54992 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -78,13 +78,13 @@ static MALLOC_DEFINE(M_SMBFSHASH, "SMBFS hash", "SMBFS hash table");
static int smbfs_mount(struct mount *, char *, caddr_t,
- struct nameidata *, struct proc *);
-static int smbfs_quotactl(struct mount *, int, uid_t, caddr_t, struct proc *);
+ struct nameidata *, struct thread *);
+static int smbfs_quotactl(struct mount *, int, uid_t, caddr_t, struct thread *);
static int smbfs_root(struct mount *, struct vnode **);
-static int smbfs_start(struct mount *, int, struct proc *);
-static int smbfs_statfs(struct mount *, struct statfs *, struct proc *);
-static int smbfs_sync(struct mount *, int, struct ucred *, struct proc *);
-static int smbfs_unmount(struct mount *, int, struct proc *);
+static int smbfs_start(struct mount *, int, struct thread *);
+static int smbfs_statfs(struct mount *, struct statfs *, struct thread *);
+static int smbfs_sync(struct mount *, int, struct ucred *, struct thread *);
+static int smbfs_unmount(struct mount *, int, struct thread *);
static int smbfs_init(struct vfsconf *vfsp);
static int smbfs_uninit(struct vfsconf *vfsp);
@@ -134,7 +134,7 @@ int smbfs_pbuf_freecnt = -1; /* start out unlimited */
static int
smbfs_mount(struct mount *mp, char *path, caddr_t data,
- struct nameidata *ndp, struct proc *p)
+ struct nameidata *ndp, struct thread *td)
{
struct smbfs_args args; /* will hold data from mount request */
struct smbmount *smp = NULL;
@@ -164,14 +164,14 @@ smbfs_mount(struct mount *mp, char *path, caddr_t data,
SMBFS_VERSION, args.version);
return EINVAL;
}
- smb_makescred(&scred, p, p->p_ucred);
+ smb_makescred(&scred, td, td->td_proc->p_ucred);
error = smb_dev2share(args.dev, SMBM_EXEC, &scred, &ssp);
if (error) {
printf("invalid device handle %d (%d)\n", args.dev, error);
return error;
}
vcp = SSTOVC(ssp);
- smb_share_unlock(ssp, 0, p);
+ smb_share_unlock(ssp, 0, td);
mp->mnt_stat.f_iosize = SSTOVC(ssp)->vc_txmax;
#ifdef SMBFS_USEZONE
@@ -226,7 +226,7 @@ smbfs_mount(struct mount *mp, char *path, caddr_t data,
error = smbfs_root(mp, &vp);
if (error)
goto bad;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, 0, td);
SMBVDEBUG("root.v_usecount = %d\n", vp->v_usecount);
#ifdef DIAGNOSTICS
@@ -251,7 +251,7 @@ bad:
/* Unmount the filesystem described by mp. */
static int
-smbfs_unmount(struct mount *mp, int mntflags, struct proc *p)
+smbfs_unmount(struct mount *mp, int mntflags, struct thread *td)
{
struct smbmount *smp = VFSTOSMBFS(mp);
struct smb_cred scred;
@@ -265,7 +265,7 @@ smbfs_unmount(struct mount *mp, int mntflags, struct proc *p)
error = vflush(mp, 1, flags);
if (error)
return error;
- smb_makescred(&scred, p, p->p_ucred);
+ smb_makescred(&scred, td, td->td_proc->p_ucred);
smb_share_put(smp->sm_share, &scred);
mp->mnt_data = (qaddr_t)0;
@@ -291,8 +291,8 @@ smbfs_root(struct mount *mp, struct vnode **vpp)
struct vnode *vp;
struct smbnode *np;
struct smbfattr fattr;
- struct proc *p = curproc;
- struct ucred *cred = p->p_ucred;
+ struct thread *td = curthread;
+ struct ucred *cred = td->td_proc->p_ucred;
struct smb_cred scred;
int error;
@@ -302,9 +302,9 @@ smbfs_root(struct mount *mp, struct vnode **vpp)
}
if (smp->sm_root) {
*vpp = SMBTOV(smp->sm_root);
- return vget(*vpp, LK_EXCLUSIVE | LK_RETRY, p);
+ return vget(*vpp, LK_EXCLUSIVE | LK_RETRY, td);
}
- smb_makescred(&scred, p, cred);
+ smb_makescred(&scred, td, cred);
error = smbfs_smb_lookup(NULL, NULL, 0, &fattr, &scred);
if (error)
return error;
@@ -323,10 +323,10 @@ smbfs_root(struct mount *mp, struct vnode **vpp)
*/
/* ARGSUSED */
static int
-smbfs_start(mp, flags, p)
+smbfs_start(mp, flags, td)
struct mount *mp;
int flags;
- struct proc *p;
+ struct thread *td;
{
SMBVDEBUG("flags=%04x\n", flags);
return 0;
@@ -337,12 +337,12 @@ smbfs_start(mp, flags, p)
*/
/* ARGSUSED */
static int
-smbfs_quotactl(mp, cmd, uid, arg, p)
+smbfs_quotactl(mp, cmd, uid, arg, td)
struct mount *mp;
int cmd;
uid_t uid;
caddr_t arg;
- struct proc *p;
+ struct thread *td;
{
SMBVDEBUG("return EOPNOTSUPP\n");
return EOPNOTSUPP;
@@ -358,7 +358,7 @@ smbfs_init(struct vfsconf *vfsp)
name[0] = CTL_HW;
name[1] = HW_NCPU;
- error = kernel_sysctl(curproc, name, 2, &ncpu, &olen, NULL, 0, &plen);
+ error = kernel_sysctl(curthread, name, 2, &ncpu, &olen, NULL, 0, &plen);
if (error == 0 && ncpu > 1)
printf("warning: smbfs module compiled without SMP support.");
#endif
@@ -384,7 +384,7 @@ smbfs_uninit(struct vfsconf *vfsp)
* smbfs_statfs call
*/
int
-smbfs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
+smbfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
{
struct smbmount *smp = VFSTOSMBFS(mp);
struct smbnode *np = smp->sm_root;
@@ -397,7 +397,7 @@ smbfs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
sbp->f_iosize = SSTOVC(ssp)->vc_txmax; /* optimal transfer block size */
sbp->f_spare2 = 0; /* placeholder */
- smb_makescred(&scred, p, p->p_ucred);
+ smb_makescred(&scred, td, td->td_proc->p_ucred);
if (SMB_DIALECT(SSTOVC(ssp)) >= SMB_DIALECT_LANMAN2_0)
error = smbfs_smb_statfs2(ssp, sbp, &scred);
@@ -422,11 +422,11 @@ smbfs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
*/
/* ARGSUSED */
static int
-smbfs_sync(mp, waitfor, cred, p)
+smbfs_sync(mp, waitfor, cred, td)
struct mount *mp;
int waitfor;
struct ucred *cred;
- struct proc *p;
+ struct thread *td;
{
struct vnode *vp;
int error, allerror = 0;
@@ -450,9 +450,9 @@ loop:
#endif
waitfor == MNT_LAZY)
continue;
- if (vget(vp, LK_EXCLUSIVE, p))
+ if (vget(vp, LK_EXCLUSIVE, td))
goto loop;
- error = VOP_FSYNC(vp, cred, waitfor, p);
+ error = VOP_FSYNC(vp, cred, waitfor, td);
if (error)
allerror = error;
vput(vp);
OpenPOWER on IntegriCloud