Date: Sat, 8 Jul 2017 21:08:22 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320817 - head/sys/fs/fdescfs Message-ID: <201707082108.v68L8MKY002117@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707082108.v68L8MKY002117>