diff options
Diffstat (limited to 'sys/fs/smbfs/smbfs_vfsops.c')
-rw-r--r-- | sys/fs/smbfs/smbfs_vfsops.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c index 71b3960..b762bde 100644 --- a/sys/fs/smbfs/smbfs_vfsops.c +++ b/sys/fs/smbfs/smbfs_vfsops.c @@ -104,7 +104,7 @@ MODULE_DEPEND(smbfs, libmchain, 1, 1, 1); int smbfs_pbuf_freecnt = -1; /* start out unlimited */ static int -smbfs_cmount(struct mntarg *ma, void * data, int flags, struct thread *td) +smbfs_cmount(struct mntarg *ma, void * data, int flags) { struct smbfs_args args; int error; @@ -143,16 +143,18 @@ static const char *smbfs_opts[] = { }; static int -smbfs_mount(struct mount *mp, struct thread *td) +smbfs_mount(struct mount *mp) { struct smbmount *smp = NULL; struct smb_vc *vcp; struct smb_share *ssp = NULL; struct vnode *vp; + struct thread *td; struct smb_cred scred; int error, v; char *pc, *pe; + td = curthread; if (mp->mnt_flag & (MNT_UPDATE | MNT_ROOTFS)) return EOPNOTSUPP; @@ -249,7 +251,7 @@ smbfs_mount(struct mount *mp, struct thread *td) } } vfs_getnewfsid(mp); - error = smbfs_root(mp, LK_EXCLUSIVE, &vp, td); + error = smbfs_root(mp, LK_EXCLUSIVE, &vp); if (error) { vfs_mount_error(mp, "smbfs_root error: %d", error); goto bad; @@ -279,13 +281,15 @@ bad: /* Unmount the filesystem described by mp. */ static int -smbfs_unmount(struct mount *mp, int mntflags, struct thread *td) +smbfs_unmount(struct mount *mp, int mntflags) { + struct thread *td; struct smbmount *smp = VFSTOSMBFS(mp); struct smb_cred scred; int error, flags; SMBVDEBUG("smbfs_unmount: flags=%04x\n", mntflags); + td = curthread; flags = 0; if (mntflags & MNT_FORCE) flags |= FORCECLOSE; @@ -329,16 +333,20 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td) * Return locked root vnode of a filesystem */ static int -smbfs_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td) +smbfs_root(struct mount *mp, int flags, struct vnode **vpp) { struct smbmount *smp = VFSTOSMBFS(mp); struct vnode *vp; struct smbnode *np; struct smbfattr fattr; - struct ucred *cred = td->td_ucred; + struct thread *td; + struct ucred *cred; struct smb_cred scred; int error; + td = curthread; + cred = td->td_ucred; + if (smp == NULL) { SMBERROR("smp == NULL (bug in umount)\n"); vfs_mount_error(mp, "smp == NULL (bug in umount)"); @@ -368,12 +376,11 @@ smbfs_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td) */ /* ARGSUSED */ static int -smbfs_quotactl(mp, cmd, uid, arg, td) +smbfs_quotactl(mp, cmd, uid, arg) struct mount *mp; int cmd; uid_t uid; void *arg; - struct thread *td; { SMBVDEBUG("return EOPNOTSUPP\n"); return EOPNOTSUPP; @@ -404,8 +411,9 @@ smbfs_uninit(struct vfsconf *vfsp) * smbfs_statfs call */ int -smbfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) +smbfs_statfs(struct mount *mp, struct statfs *sbp) { + struct thread *td = curthread; struct smbmount *smp = VFSTOSMBFS(mp); struct smbnode *np = smp->sm_root; struct smb_share *ssp = smp->sm_share; |