diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-03-02 18:56:13 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-03-02 18:56:13 +0000 |
commit | f0f08023032c77ced011d5d7fabf44b57fb62581 (patch) | |
tree | abced7be7c6eb96a24887b3270f7f14104461bdc /sys/fs/smbfs/smbfs_vfsops.c | |
parent | 767a2621f07a4ba9a59a9d383581ed5558f667db (diff) | |
download | FreeBSD-src-f0f08023032c77ced011d5d7fabf44b57fb62581.zip FreeBSD-src-f0f08023032c77ced011d5d7fabf44b57fb62581.tar.gz |
Replace lockmgr lock protecting smbfs node hash table with sx lock.
MFC after: 1 month
Diffstat (limited to 'sys/fs/smbfs/smbfs_vfsops.c')
-rw-r--r-- | sys/fs/smbfs/smbfs_vfsops.c | 7 |
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 |