From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 160CE348875; Sat, 23 May 2026 17:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779558986; cv=none; b=Cc5oZuAvzCoYwXqSDcRB1WWBdsbtp/kHmJtwEq8hi+t71W+5+R7jOUSWovmU13QwhBzPodlvfWL84cG7Za4Di7wwZxn3yOCtpJY31l+d8yfVI4VjWqtMgbqh8YyM5ZPzZnv/yCVmTi6v2LGE7iB3fh6bd9X8NUil7C5q2gAI4lU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779558986; c=relaxed/simple; bh=HXrQZpeWN85ojYx7kPWIMvSe3/c5RK1MgAHwTCxVs7s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BGDFk7XNWf0KEBAgnbG5Pc2EAKnoHJX2CdMrgrBDXgqfwA7JIXGOQN6FGeXWCkzAqouRieUSVfbKyTo5h4Tjx6wJ8HN+p2RdkjUN0OzTjguOoznKhV79geWHIcnAU5a36h6I73HhcXAgdW/pvRnXWebytjOdsInA/CGsUT+uOYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CveTOEuJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CveTOEuJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB9F91F000E9; Sat, 23 May 2026 17:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779558984; bh=64moEsVhgfwgI6MhFHgVhfH5MiESSq4cUiaY8/kUbXc=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=CveTOEuJd+8kC+bH8xjZnQAePmub9EwWAVXdLRANzb/MECJO4ML8rsBSy4pLSKa0W FrVbvpSksYISZvH1Z5MZbtgs9CxiG5hrdqrLB5qb0lPXnY4XumgNVts5Zabanhatzt SKf24aQMydc6/9+t12q/leOfbrgBdAYUSXhlUiHVGD/YoGeJL1Jf4asA3Ki526udT+ OUho1AaqLkVVrZMX+o13pw+MCa0ch38JG20IOMI7GBteAYKyB1H0hGJ+66+wJQ2oXV 6XzMbyLsODlr9wOMo0TqSG+134+nnOMh4L23aLFTHMFEUHc6qs/zEMUbSzSTl5JWtv RScWemXv3O84A== From: "Mike Rapoport (Microsoft)" Date: Sat, 23 May 2026 20:54:26 +0300 Subject: [PATCH 14/17] fs/namespace: use __getname() to allocate mntpath buffer Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260523-b4-fs-v1-14-275e36a83f0e@kernel.org> References: <20260523-b4-fs-v1-0-275e36a83f0e@kernel.org> In-Reply-To: <20260523-b4-fs-v1-0-275e36a83f0e@kernel.org> To: Jan Kara , Mark Fasheh , Joel Becker , Joseph Qi , Ryusuke Konishi , Viacheslav Dubeyko , Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , NeilBrown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Alexander Viro , Christian Brauner , Jan Kara , Dave Kleikamp , Theodore Ts'o , Miklos Szeredi , Andreas Hindborg , Breno Leitao , Kees Cook , "Tigran A. Aivazian" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, ocfs2-devel@lists.linux.dev, linux-nilfs@vger.kernel.org, linux-nfs@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-mm@kvack.org, "Mike Rapoport (Microsoft)" X-Mailer: b4 0.15.2 mnt_warn_timestamp_expiry() allocates memory for a path with __get_free_page() although there is a dedicated helper for allocation of file paths: __getname(). Replace __get_free_page() for allocation of a path buffer with __getname(). Signed-off-by: Mike Rapoport (Microsoft) --- fs/namespace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index fe919abd2f01..2ed9cd846a81 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3303,7 +3303,7 @@ static void mnt_warn_timestamp_expiry(const struct path *mountpoint, (ktime_get_real_seconds() + TIME_UPTIME_SEC_MAX > sb->s_time_max)) { char *buf, *mntpath; - buf = (char *)__get_free_page(GFP_KERNEL); + buf = __getname(); if (buf) mntpath = d_path(mountpoint, buf, PAGE_SIZE); else @@ -3319,7 +3319,7 @@ static void mnt_warn_timestamp_expiry(const struct path *mountpoint, sb->s_iflags |= SB_I_TS_EXPIRY_WARNED; if (buf) - free_page((unsigned long)buf); + __putname(buf); } } -- 2.53.0