summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs/smbfs_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/smbfs/smbfs_vfsops.c')
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index 2dc9e6d..a811e00 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -44,6 +44,7 @@
#include <sys/stat.h>
#include <sys/malloc.h>
#include <sys/module.h>
+#include <sys/sx.h>
#include <netsmb/smb.h>
@@ -192,7 +193,7 @@ smbfs_mount(struct mount *mp, struct thread *td)
smp->sm_hash = hashinit(desiredvnodes, M_SMBFSHASH, &smp->sm_hashlen);
if (smp->sm_hash == NULL)
goto bad;
- lockinit(&smp->sm_hashlock, PVFS, "smbfsh", 0, 0);
+ sx_init(&smp->sm_hashlock, "smbfsh");
smp->sm_share = ssp;
smp->sm_root = NULL;
if (1 != vfs_scanopt(mp->mnt_optnew,
@@ -264,7 +265,7 @@ bad:
if (smp) {
if (smp->sm_hash)
free(smp->sm_hash, M_SMBFSHASH);
- lockdestroy(&smp->sm_hashlock);
+ sx_destroy(&smp->sm_hashlock);
#ifdef SMBFS_USEZONE
zfree(smbfsmount_zone, smp);
#else
@@ -312,7 +313,7 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td)
if (smp->sm_hash)
free(smp->sm_hash, M_SMBFSHASH);
- lockdestroy(&smp->sm_hashlock);
+ sx_destroy(&smp->sm_hashlock);
#ifdef SMBFS_USEZONE
zfree(smbfsmount_zone, smp);
#else
OpenPOWER on IntegriCloud