From nobody Wed Apr 13 23:10:07 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6BA591B42300; Wed, 13 Apr 2022 23:10:08 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kdywv75SZz4mC7; Wed, 13 Apr 2022 23:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZOFqKDpB2kwxVmTA5nB0wZKtqLNb3fmqqOw8DIRCty8=; b=id3Ydv8t5Rfyp0czw6bXoketwONA6kqvuJ4kI4PGssWiO17sW9ktkXrAZ4k2IXGk1wk9jz NwUYeM3m1kJjIlXoO0n/KFgOoieOne1vrek4EoJunXCULpxZqw/XvfGZD7A/hY5EXa8+3p UEj5d7dvLdIoVTTMEFkLYOa2ZeQ18Idjm9FVK0ikWauexnO9SqHPlkPu3v7km0EuWgbQJz GeLY5rTuIkzGjuqNx7bZGHnENCutXJ7n2nvGzBOFWVRyHH3V8czeF4Jq85tAk7oRQKWbYu IvYNCD0bTXlpdzb4ivxkBey4cR0KnMDVhJlaHlAaSpTSj9r7RgxoVJzHWbluwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B359014CF8; Wed, 13 Apr 2022 23:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23DNA7Pg078037; Wed, 13 Apr 2022 23:10:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23DNA7fk078035; Wed, 13 Apr 2022 23:10:07 GMT (envelope-from git) Date: Wed, 13 Apr 2022 23:10:07 GMT Message-Id: <202204132310.23DNA7fk078035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 36fb372264a8 - main - kern: Move variables only used for MAC under #ifdef MAC. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36fb372264a85da3f86b4750dd7ba0bdb3d2e967 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZOFqKDpB2kwxVmTA5nB0wZKtqLNb3fmqqOw8DIRCty8=; b=bM2k90pPnq6A8cUvOlD82xkLn+2ALQzkkzo1IDBadQRrHqBO7OK2ICuYWLFaTMRUB97xpr 3qPMae4KYqNBDUm5k5EoVH6db7MvRSMyDUs5wLGUIbv/MJ3brq/NKwfkazVaKU+aUeBOoQ x89K2mMLkhHYjeZfe4wfLS0ojnQ42YYgpE2QiTvt6WNOT0ghAJmNrdY1giMnml3FpJN5jM 3l5vDJqlnzASyp8ZhiXJA87J0njzLZqJKHRFnVth56RzgUZV4708Vq1RdUus/4+m19GYjH gwEZ9MJ96QZ5YNke7UPUHzKs+dZtBYzZbT+algpcUrM6dbgv/kZWNO2jYmuXfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649891408; a=rsa-sha256; cv=none; b=pNSlvc/VUEoKU3BJ3TGn1C5IpayaLHmRxyquKASpicV+Vswn2J31278bd6TJMv5dEMYdEY oBD3RcIZQacJ5gwQsYwm+9TCGPMa5Nd6SWU6pcpVZ5anmwJzlBjsqm+FAONfl3CXwQ77nU D31NOhfsKiHPV5y3rjRg8oJXahiooEsIWf9t3rtMClnQ/xH2DitHx8VyRoaD2zFQCbIL6S UtDmvOp6/Ur9LURCaLxyld8baaGKMTrYmo9Y5u0jlD2MMd+KjsFi8+wFftFtM8y4HLu3rB KkbXLl751OxPnVVQEGXZ9xbs4ba9wUCGoUomtxlMI1dSWrM7z+Y3fng1odx0sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=36fb372264a85da3f86b4750dd7ba0bdb3d2e967 commit 36fb372264a85da3f86b4750dd7ba0bdb3d2e967 Author: John Baldwin AuthorDate: 2022-04-13 23:08:23 +0000 Commit: John Baldwin CommitDate: 2022-04-13 23:08:23 +0000 kern: Move variables only used for MAC under #ifdef MAC. --- sys/kern/sys_pipe.c | 4 ++++ sys/kern/sys_socket.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 1d5d7329692e..32ed17c0fe23 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1646,14 +1646,18 @@ pipe_free_kmem(struct pipe *cpipe) static void pipeclose(struct pipe *cpipe) { +#ifdef MAC struct pipepair *pp; +#endif struct pipe *ppipe; KASSERT(cpipe != NULL, ("pipeclose: cpipe == NULL")); PIPE_LOCK(cpipe); pipelock(cpipe, 0); +#ifdef MAC pp = cpipe->pipe_pair; +#endif /* * If the other side is blocked, wake it up saying that diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 4e752fa6b664..774b317c6ecb 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -597,7 +597,9 @@ soaio_process_job(struct socket *so, struct sockbuf *sb, struct kaiocb *job) { struct ucred *td_savedcred; struct thread *td; - struct file *fp; +#ifdef MAC + struct file *fp = job->fd_file; +#endif size_t cnt, done, job_total_nbytes __diagused; long ru_before; int error, flags; @@ -605,7 +607,6 @@ soaio_process_job(struct socket *so, struct sockbuf *sb, struct kaiocb *job) SOCKBUF_UNLOCK(sb); aio_switch_vmspace(job); td = curthread; - fp = job->fd_file; retry: td_savedcred = td->td_ucred; td->td_ucred = job->cred;