Author: dchagin
Date: Sat Jul  8 21:08:22 2017
New Revision: 320817
URL: https://svnweb.freebsd.org/changeset/base/320817

Log:
  Don't take a lock around atomic operation.
  
  MFC after:    3 weeks

Modified:
  head/sys/fs/fdescfs/fdesc_vfsops.c

Modified: head/sys/fs/fdescfs/fdesc_vfsops.c
==============================================================================
--- head/sys/fs/fdescfs/fdesc_vfsops.c  Sat Jul  8 21:05:28 2017        
(r320816)
+++ head/sys/fs/fdescfs/fdesc_vfsops.c  Sat Jul  8 21:08:22 2017        
(r320817)
@@ -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);
 }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to