Don't take a lock around atomic operation.

MFC after:	3 weeks
This commit is contained in:
Dmitry Chagin 2017-07-08 21:08:22 +00:00
parent 073b14b469
commit b9d3485fb4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320817

View file

@ -123,7 +123,6 @@ static int
fdesc_unmount(struct mount *mp, int mntflags)
{
struct fdescmount *fmp;
caddr_t data;
int error, flags;
flags = 0;
@ -148,15 +147,10 @@ fdesc_unmount(struct mount *mp, int mntflags)
return (error);
/*
* Finally, throw away the fdescmount structure. Hold the hashmtx to
* protect the fdescmount structure.
* Finally, throw away the fdescmount structure.
*/
mtx_lock(&fdesc_hashmtx);
data = mp->mnt_data;
mp->mnt_data = NULL;
mtx_unlock(&fdesc_hashmtx);
free(data, M_FDESCMNT); /* XXX */
free(fmp, M_FDESCMNT);
return (0);
}