From owner-svn-src-head@freebsd.org Fri Feb 14 11:21:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15E352476A5; Fri, 14 Feb 2020 11:21:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48JrYN6srwz4QV0; Fri, 14 Feb 2020 11:21:28 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E740922C07; Fri, 14 Feb 2020 11:21:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01EBLSwM030612; Fri, 14 Feb 2020 11:21:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01EBLSVF030609; Fri, 14 Feb 2020 11:21:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202002141121.01EBLSVF030609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 14 Feb 2020 11:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357907 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 357907 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.29 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: Fri, 14 Feb 2020 11:21:29 -0000 Author: mjg Date: Fri Feb 14 11:21:28 2020 New Revision: 357907 URL: https://svnweb.freebsd.org/changeset/base/357907 Log: lockmgr: rename lock_fast_path to lock_flags The routine is not much of a fast path and the flags name better describes its purpose. Modified: head/sys/kern/kern_lock.c head/sys/kern/vfs_default.c head/sys/sys/lockmgr.h Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Fri Feb 14 11:20:25 2020 (r357906) +++ head/sys/kern/kern_lock.c Fri Feb 14 11:21:28 2020 (r357907) @@ -934,7 +934,7 @@ out: } int -lockmgr_lock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk, +lockmgr_lock_flags(struct lock *lk, u_int flags, struct lock_object *ilk, const char *file, int line) { struct lock_class *class; @@ -1123,7 +1123,7 @@ out: * 2. returning with an error after sleep * 3. unlocking the interlock * - * If in doubt, use lockmgr_*_fast_path. + * If in doubt, use lockmgr_lock_flags. */ int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line) Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Fri Feb 14 11:20:25 2020 (r357906) +++ head/sys/kern/vfs_default.c Fri Feb 14 11:21:28 2020 (r357907) @@ -513,7 +513,7 @@ vop_stdlock(ap) struct mtx *ilk; ilk = VI_MTX(vp); - return (lockmgr_lock_fast_path(vp->v_vnlock, ap->a_flags, + return (lockmgr_lock_flags(vp->v_vnlock, ap->a_flags, &ilk->lock_object, ap->a_file, ap->a_line)); } Modified: head/sys/sys/lockmgr.h ============================================================================== --- head/sys/sys/lockmgr.h Fri Feb 14 11:20:25 2020 (r357906) +++ head/sys/sys/lockmgr.h Fri Feb 14 11:21:28 2020 (r357907) @@ -70,7 +70,7 @@ struct thread; */ int __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, const char *wmesg, int prio, int timo, const char *file, int line); -int lockmgr_lock_fast_path(struct lock *lk, u_int flags, +int lockmgr_lock_flags(struct lock *lk, u_int flags, struct lock_object *ilk, const char *file, int line); int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line); int lockmgr_xlock(struct lock *lk, u_int flags, const char *file, int line);