From nobody Thu Nov 25 22:50:49 2021 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 2260E18BE6DF; Thu, 25 Nov 2021 22:50:51 +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 4J0Y4n5jDqz3Ncl; Thu, 25 Nov 2021 22:50:49 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 8C6EA25C84; Thu, 25 Nov 2021 22:50:49 +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 1APMonAB060906; Thu, 25 Nov 2021 22:50:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APMonmd060905; Thu, 25 Nov 2021 22:50:49 GMT (envelope-from git) Date: Thu, 25 Nov 2021 22:50:49 GMT Message-Id: <202111252250.1APMonmd060905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: c40fee6f7d26 - main - vfs: drop the always curthread argument from kern_alternate_path 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c40fee6f7d26862260f0accc1dfeaa7b1328f5fd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637880649; 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=PkrQU0n93dZxXgZMD/Kie4oaWbKFfRa+SSWS6eVeQD8=; b=bVLbfqhQPwb/BHUjILfKRyJZ3rV+UXlxBLK92IUrxyPWN0YjL3n98MmBKoWvw30IBtv0GY DheOgf0+6ZVoXQZd1JeZDFl18e8BJ9EbPVW6QewoNOTU8ghgf6OmRx4AotRtXPf7TIG3aP tWi/bc4Qcj8mTps0NJ+tx3BsDv+lrmEbKQNVlyfgWG7zmmnQQK4Itx1EtcxaG2/nh23qWk iNWRb8730ArwYvthGZiGJVByuZlysbW69H/Ym4JfZAPQSci9Wom4IqkKuV0YdLzH+FJA/N Vt5qk8uR7/afY6eLLfwYP4DEfd6Wq/PGhz6CwNoUzPfQaMDfce3QWQP0ryAdGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637880649; a=rsa-sha256; cv=none; b=NIuFtM3lXkmM+taMXcwiEX9N4fo7aawBFOQZsE9d9iX0jWcoQQ5EB//GvkW2d3cZJHjiCy BYzt7f9Ygh0I34RMXP+0saR+TystOuZQOLJKvvsjrLxWH0p+/DCfSPuPSltnjaqmA1UK+m 7rSpB7cwgm59+GJQMWlBaLXCUDwaWEq7PWhYweXCphFoMhW2wlKDbPihe0lIimoyL0zUBW f4dAs9gf62bZPfV4RRYs3W5w86laA+SPy12zmZeW7qBS1vVTjuvR1ZdDl3yFL+6f7Bd23n BaFhcigqsmA/2454yaLRTqkVr9A7T5QQnVI4s7GJB5QKzSGTK7RzOh7il0DGkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c40fee6f7d26862260f0accc1dfeaa7b1328f5fd commit c40fee6f7d26862260f0accc1dfeaa7b1328f5fd Author: Mateusz Guzik AuthorDate: 2021-11-25 21:42:42 +0000 Commit: Mateusz Guzik CommitDate: 2021-11-25 22:50:42 +0000 vfs: drop the always curthread argument from kern_alternate_path --- sys/compat/linux/linux_util.c | 2 +- sys/kern/vfs_lookup.c | 6 ++++-- sys/sys/syscallsubr.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 800a55be33df..35376db6063d 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -95,7 +95,7 @@ linux_emul_convpath(const char *path, enum uio_seg pathseg, { int retval; - retval = kern_alternate_path(curthread, linux_emul_path, path, pathseg, pbuf, + retval = kern_alternate_path(linux_emul_path, path, pathseg, pbuf, cflag, dfd); return (retval); diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 8cccd93152ef..6ca8ac6de6fc 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1673,14 +1673,16 @@ out_mismatch: * the M_TEMP bucket if one is returned. */ int -kern_alternate_path(struct thread *td, const char *prefix, const char *path, - enum uio_seg pathseg, char **pathbuf, int create, int dirfd) +kern_alternate_path(const char *prefix, const char *path, enum uio_seg pathseg, + char **pathbuf, int create, int dirfd) { + struct thread *td; struct nameidata nd, ndroot; char *ptr, *buf, *cp; size_t len, sz; int error; + td = curthread; buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); *pathbuf = buf; diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 24d2a199a272..62dde37c0c1f 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -91,7 +91,7 @@ int kern_accessat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode); int kern_adjtime(struct thread *td, struct timeval *delta, struct timeval *olddelta); -int kern_alternate_path(struct thread *td, const char *prefix, const char *path, +int kern_alternate_path(const char *prefix, const char *path, enum uio_seg pathseg, char **pathbuf, int create, int dirfd); int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); int kern_break(struct thread *td, uintptr_t *addr);