mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't take a lock around atomic operation.
MFC after: 3 weeks
This commit is contained in:
parent
073b14b469
commit
b9d3485fb4
1 changed files with 2 additions and 8 deletions
|
|
@ -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