Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp124905lqb; Tue, 16 Apr 2024 10:29:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkSB/YGnWUsOo5YcoNbp+MaC09zLPHFRJJ4eSyeZWjMbp091U56Sc+We+eh8OM6eRmkJb94bzJsu5fKRFvSufh33OpiKS8oNwrlFCzaQ== X-Google-Smtp-Source: AGHT+IHyMFT+u88dmn3wyMDiTkE+JVkNV+WPJopVp5yuo1yikN5eJYR3am5yXRffRA+oGSIn0tj1 X-Received: by 2002:a05:622a:1807:b0:434:e30b:2cf8 with SMTP id t7-20020a05622a180700b00434e30b2cf8mr14956287qtc.30.1713288592169; Tue, 16 Apr 2024 10:29:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713288592; cv=pass; d=google.com; s=arc-20160816; b=llETHSKvy1DZZCggnMoJ1uQytSl/r4hrY6atJhuCdrHhulSCQqVhZ35f/SdRa3qqfO dsHZTqBfoxa10fhekEkD5kRBFVtSPRICltWcYVB04Jn6hDOyOWMBRNXvJe0J+w1GWdzg WXLKhhDTcVpmJj6YwwmjleWgziIzz9ATyAebk9P379pM9s/OJz+y82YthNksk4zIaQyP g26SEf/NizXsNZeK6GMikFryykVqrBI0aVfrLLNl/U0sqBVpAlCvShYGwXdwJx8YxByq JioCBH+/OvD4eUTVjeRWf+r0yzY+jqtS5z0YmF2/IMX0qnPsDFGZsCR9VBUAyNIRArGP eVZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=DWfSGd1fMqhaOSHtrzDMm5FJGpBXBmh/XpmokkXqtXw=; fh=vEBELtqxZyFFxk5tX+SkzdBzE8+ACq77mzWn/KAFIJA=; b=ldIMYwHbU2Wv93FcdkMb2xD56APYwTqWjUKcBZFArvtmeUSaR9yNCfCCw7VArCeZjY KsvvX3JbDafOsalfdDxsS29LwYLEKvTiJNs17w4T7CsvtVv82xNU5fmvL68jcdbUcj5y XZLQ07J1Ky4XdC4LIi6IT0cRQWV2o/k1MQEcbIxSqoeunF6qC9ksW6vUow8bJtqKlP0P tI3me2AGGvpOtsZ8dvaa4vRfY9hLLLLxs7u7Ud98yTKJjXVc7LCsaX2YrRB6TrI32kce 6PGG5GueLSqPumi/UI1z0EDWE4pY8++3PtUgix4M85ym57bH537e4SaFEDq4k25MWefP CRSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=atsqtowk; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-2114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2114-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u15-20020a05622a010f00b004315fa82734si12779086qtw.494.2024.04.16.10.29.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 10:29:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=atsqtowk; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-2114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2114-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B80291C2139C for ; Tue, 16 Apr 2024 17:29:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72DF11350EF; Tue, 16 Apr 2024 17:29:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="atsqtowk" X-Original-To: linux-ext4@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 BCB22133982; Tue, 16 Apr 2024 17:29:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713288563; cv=none; b=T8fP7SCOohTHjBhZqyAQFHdjwbFVj9hsnpTFkn10tRJofU4WbWPmNFLj0V1DHznPOl1G8xHqglmne82cj1lqlohc0W/+MzlgAB2GgvTXaxBod13Th0vYkXXCURYR+2vho1pRYjb24+Yfw7J+EJ3Q7j7WO6zgrd43zZ9g3aUdOCE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713288563; c=relaxed/simple; bh=H3sAZrVcRVwXbTF6OQcW3kqHsui4B9DnClG+Qr7StmM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BBssLs0MAwfibRaCCTFoCIB4UjpHBpqABXnGt5qDaDgoKo05WY40Po2UzCCll7l3WENhzJ1wl+1D47JtKp4fBdbJvBk3OspxTzHVICgsTFxfqFgUH8Kc2o92Xyn37Vn31441g9Dnvp8TIokx86z2EduYkGmD5slfEqapTMzv/KU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=atsqtowk; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=DWfSGd1fMqhaOSHtrzDMm5FJGpBXBmh/XpmokkXqtXw=; b=atsqtowkjGF9n4acXJ+0DKDx/q wUbOrSrmG1Dm8P9iGX60tesj+b1HUfqivVQoLXA9nrjVJaqlDyoqq8NxhqTIOVBpYRSgwC2IVfKd6 5vqihDmtnbiq7WGqs5j4ic3wbyiSQsGGJmQy201aQhkfrFu5KMzthjkYrPzUPS/JyRYWWkhrRGJ3P PYCUR9XOl1lm+73+yF4zl3pcIO2zy1Co6OrlHhddAITADjwHM2QxFy0uzfYG+JU7bftGV4gWfLtFL j4WHtimAPC2B7e12Fh+tboWLQ59spUM0QaqXzeinHIVYfDNU47MN4Stwl0+dtyjKSPKu5Y6vXL/NF u/2X+SMQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwmcF-000000011eX-099L; Tue, 16 Apr 2024 17:29:07 +0000 From: "Matthew Wilcox (Oracle)" To: "Theodore Ts'o" Cc: "Matthew Wilcox (Oracle)" , Andreas Dilger , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 4/5] ext4: Convert ac_bitmap_page to ac_bitmap_folio Date: Tue, 16 Apr 2024 18:28:57 +0100 Message-ID: <20240416172900.244637-5-willy@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240416172900.244637-1-willy@infradead.org> References: <20240416172900.244637-1-willy@infradead.org> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This just carries around the bd_bitmap_folio so should also be a folio. Signed-off-by: Matthew Wilcox (Oracle) --- fs/ext4/mballoc.c | 8 ++++---- fs/ext4/mballoc.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 50bdf3646d45..b2ea016f259d 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2153,8 +2153,8 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac, * double allocate blocks. The reference is dropped * in ext4_mb_release_context */ - ac->ac_bitmap_page = &e4b->bd_bitmap_folio->page; - get_page(ac->ac_bitmap_page); + ac->ac_bitmap_folio = e4b->bd_bitmap_folio; + folio_get(ac->ac_bitmap_folio); ac->ac_buddy_page = &e4b->bd_buddy_folio->page; get_page(ac->ac_buddy_page); /* store last allocated for subsequent stream allocation */ @@ -5993,8 +5993,8 @@ static void ext4_mb_release_context(struct ext4_allocation_context *ac) ext4_mb_put_pa(ac, ac->ac_sb, pa); } - if (ac->ac_bitmap_page) - put_page(ac->ac_bitmap_page); + if (ac->ac_bitmap_folio) + folio_put(ac->ac_bitmap_folio); if (ac->ac_buddy_page) put_page(ac->ac_buddy_page); if (ac->ac_flags & EXT4_MB_HINT_GROUP_ALLOC) diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 720fb277abd2..ec1348fe1c04 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h @@ -204,7 +204,7 @@ struct ext4_allocation_context { __u8 ac_2order; /* if request is to allocate 2^N blocks and * N > 0, the field stores N, otherwise 0 */ __u8 ac_op; /* operation, for history only */ - struct page *ac_bitmap_page; + struct folio *ac_bitmap_folio; struct page *ac_buddy_page; struct ext4_prealloc_space *ac_pa; struct ext4_locality_group *ac_lg; -- 2.43.0