From owner-svn-src-head@freebsd.org Sat Jul 8 21:08:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5FABDA2806; Sat, 8 Jul 2017 21:08:23 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BC0668030; Sat, 8 Jul 2017 21:08:23 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68L8M0D002118; Sat, 8 Jul 2017 21:08:22 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68L8MKY002117; Sat, 8 Jul 2017 21:08:22 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707082108.v68L8MKY002117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 8 Jul 2017 21:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320817 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 320817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 21:08:23 -0000 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); }