mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Don't take a lock around atomic operation.
MFC after: 3 weeks
This commit is contained in:
parent
073b14b469
commit
b9d3485fb4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320817
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue