From owner-svn-src-all@freebsd.org Wed Mar 2 00:13:15 2016 Return-Path: Delivered-To: svn-src-all@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 6E5C6ABD264; Wed, 2 Mar 2016 00:13:15 +0000 (UTC) (envelope-from bdrewery@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 2FB9D1518; Wed, 2 Mar 2016 00:13:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u220DEXR079268; Wed, 2 Mar 2016 00:13:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u220DE0b079265; Wed, 2 Mar 2016 00:13:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603020013.u220DE0b079265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Mar 2016 00:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296286 - head/sys/dev/filemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 00:13:15 -0000 Author: bdrewery Date: Wed Mar 2 00:13:13 2016 New Revision: 296286 URL: https://svnweb.freebsd.org/changeset/base/296286 Log: Remove filemon->lock wrappers. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/filemon/filemon.c head/sys/dev/filemon/filemon_lock.c head/sys/dev/filemon/filemon_wrapper.c Modified: head/sys/dev/filemon/filemon.c ============================================================================== --- head/sys/dev/filemon/filemon.c Tue Mar 1 23:58:53 2016 (r296285) +++ head/sys/dev/filemon/filemon.c Wed Mar 2 00:13:13 2016 (r296286) @@ -127,7 +127,7 @@ filemon_dtr(void *data) /* Follow same locking order as filemon_pid_check. */ filemon_lock_write(); - filemon_filemon_lock(filemon); + sx_xlock(&filemon->lock); /* Remove from the in-use list. */ TAILQ_REMOVE(&filemons_inuse, filemon, link); @@ -140,7 +140,7 @@ filemon_dtr(void *data) TAILQ_INSERT_TAIL(&filemons_free, filemon, link); /* Give up write access. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); filemon_unlock_write(); if (fp != NULL) @@ -160,7 +160,7 @@ filemon_ioctl(struct cdev *dev, u_long c if ((error = devfs_get_cdevpriv((void **) &filemon)) != 0) return (error); - filemon_filemon_lock(filemon); + sx_xlock(&filemon->lock); switch (cmd) { /* Set the output file descriptor. */ @@ -191,7 +191,7 @@ filemon_ioctl(struct cdev *dev, u_long c break; } - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); return (error); } Modified: head/sys/dev/filemon/filemon_lock.c ============================================================================== --- head/sys/dev/filemon/filemon_lock.c Tue Mar 1 23:58:53 2016 (r296285) +++ head/sys/dev/filemon/filemon_lock.c Wed Mar 2 00:13:13 2016 (r296286) @@ -29,20 +29,6 @@ __FBSDID("$FreeBSD$"); static __inline void -filemon_filemon_lock(struct filemon *filemon) -{ - - sx_xlock(&filemon->lock); -} - -static __inline void -filemon_filemon_unlock(struct filemon *filemon) -{ - - sx_xunlock(&filemon->lock); -} - -static __inline void filemon_lock_read(void) { Modified: head/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- head/sys/dev/filemon/filemon_wrapper.c Tue Mar 1 23:58:53 2016 (r296285) +++ head/sys/dev/filemon/filemon_wrapper.c Wed Mar 2 00:13:13 2016 (r296286) @@ -79,7 +79,7 @@ filemon_pid_check(struct proc *p) TAILQ_FOREACH(filemon, &filemons_inuse, link) { if (p == filemon->p) { sx_sunlock(&proctree_lock); - filemon_filemon_lock(filemon); + sx_xlock(&filemon->lock); filemon_unlock_read(); return (filemon); } @@ -110,8 +110,7 @@ filemon_wrapper_chdir(struct thread *td, filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -139,8 +138,7 @@ filemon_event_process_exec(void *arg __u filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); free(freepath, M_TEMP); } @@ -178,8 +176,7 @@ filemon_wrapper_open(struct thread *td, curproc->p_pid, filemon->fname1); filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -231,8 +228,7 @@ filemon_wrapper_openat(struct thread *td curproc->p_pid, filemon->fname2, filemon->fname1); filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -260,8 +256,7 @@ filemon_wrapper_rename(struct thread *td filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -289,8 +284,7 @@ filemon_wrapper_link(struct thread *td, filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -318,8 +312,7 @@ filemon_wrapper_symlink(struct thread *t filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -347,8 +340,7 @@ filemon_wrapper_linkat(struct thread *td filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -374,8 +366,7 @@ filemon_wrapper_stat(struct thread *td, filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -403,8 +394,7 @@ filemon_wrapper_freebsd32_stat(struct th filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -439,8 +429,7 @@ filemon_event_process_exit(void *arg __u filemon->p = NULL; } - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -463,8 +452,7 @@ filemon_wrapper_unlink(struct thread *td filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } } @@ -485,8 +473,7 @@ filemon_event_process_fork(void *arg __u filemon_output(filemon, filemon->msgbufr, len); - /* Unlock the found filemon structure. */ - filemon_filemon_unlock(filemon); + sx_xunlock(&filemon->lock); } }