Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp76960lqi; Wed, 6 Mar 2024 10:26:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWlZRr230lKhoN6861ZX1LkFPohFKthsCGLJ9Cqer87izLICR2QN1kkCK/1qQag1iVmazEQEO+ZBXPzNanpaC4dXxcIMbe7r+Av4Leemw== X-Google-Smtp-Source: AGHT+IH5PKWl0uy4YRSpm472WIPb2RkUULffAHiCpIcp7W8JLylkkKRomk2QyvoT+XR9AaE2ezk2 X-Received: by 2002:a17:90a:6847:b0:29b:6f7d:b7aa with SMTP id e7-20020a17090a684700b0029b6f7db7aamr4097319pjm.13.1709749612239; Wed, 06 Mar 2024 10:26:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709749612; cv=pass; d=google.com; s=arc-20160816; b=yUHkABFW5W5Y71+rZeTl2z6DEZsxLdfroDvQLawBn6vswq30bkJYO4KqMRBK4gaBHv GQ03ndyrrJ6Qip2WB/xH8446rRclLiRZSsW9gPPkxYNyWWcOqMe9ZeuoVOtvHljDnrKA 4jz3jgu9Pz7eOZch/ribTNPOy3dvCOS39t8p7SPRSKFVCimailbPrDEQcQFYUwDCN/CR YMKvZv4R/o+bfJnzyQOGMnmhU4xsq4x4d2vr5JavNoDt9Hq77E/K0lPXOPjcXjwFzSkE TagZv9tq0TJ4eWC2TAA6A7KVX+vIMfsH3fD1csc7D5KVtr99BpFTbCHboJpE3MDzH75E 75fA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=/+1MAxDJuAJQyho1HAnRuoUycvJ4xPriHfVlSiFl1RY=; fh=Vq/CRYQs9XW+WPpDfcgDJhwDpMrsYCOUpQo6Tm4huj8=; b=sEQL1BOzGhEbaeIxThtI6WuaM8GQPeh8dtxSkyHJ9nOu4ympQTgX4WPZ3ukPDhQNoU nqCmBZYOZmpnI0fQyE8Lzl5zX0oJHTzgisRq5YFmKgAl/XrA+n2qKPSmLrmrl/oDEnbS XGsl5a/BipaRrd1eFlobVn7M3HjAxRWlDCUPW64ZbGsJbFCIdaXf2ImgC1yxAQB5B9Li PD2xdmbzal/0F/v8idJbS/OKafd2rDSo8EGL8KghuRLSYM+SfBMbHPrGPCQcQjeyeD+o jwm6yrDYx2aZi6l3urHDi2qApbPhwNT07UkSQcHLRvlaCx+3V8ZXTnPpPfMF45C4xTe5 BoXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=UH0oAG14; arc=pass (i=1 spf=pass spfdomain=flex--surenb.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-94396-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id fy2-20020a17090b020200b00298f693c1f9si55471pjb.32.2024.03.06.10.26.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 10:26:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94396-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=UH0oAG14; arc=pass (i=1 spf=pass spfdomain=flex--surenb.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-94396-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E216B2870A2 for ; Wed, 6 Mar 2024 18:26:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9807143747; Wed, 6 Mar 2024 18:25:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UH0oAG14" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF8E4142652 for ; Wed, 6 Mar 2024 18:24:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709749499; cv=none; b=DXNVUbfpAtil/wNd/KY30OWPblzFcjQcUIyOMft73R5WE8Zye1uMUXfyf7nFj3SVDChHTJfdu+89k1YTSxIhKoXPjMdhU9FQ4Wa2bJBUgSWjWFcqrmImtyTlUFJ77UbCtrFszii2u0U4gXm+zpmuznOdpeVb+h5xRT84PryoEDo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709749499; c=relaxed/simple; bh=2MiQKMe/NDzl6pEiZDlCs74kTpNPCZmby0N1uiwKZQI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=RIlh4vBDaMZ9jC8EULW+v2RdTjSE5nidpCQ06U/98hDfYTWODVW6DQY/6DiBLlaF0pbvhqXiiHVCbKXDaRxxtJdgCm6X9HJ/o4eQX4Oya9bkucMKsRf0x9KBUxds6QCfebKsYjBvMuInPmIPZaZ2BxafICMrVGCroeVe/3klQQ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--surenb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=UH0oAG14; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--surenb.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc6dbdcfd39so13633258276.2 for ; Wed, 06 Mar 2024 10:24:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709749495; x=1710354295; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=/+1MAxDJuAJQyho1HAnRuoUycvJ4xPriHfVlSiFl1RY=; b=UH0oAG14r/rZeYHiVopJJ/Cl4/MRZjxyKxUTWxDo0a7ZXyaCecnxk5wBDfOibOCsSE QMaAB1eG8pZ+D7SPsDq80kDqc5ISfZo1qarJ15pbXwlQPwWmsxk0FQa/GYQAYEniXqH1 15UXVxrQT1XxlKQ4S3l94D76cSwKK6ouplaYn8IS8FE9b4U6sPf29QfrzkprcQCZFxZi zaQANi3+IiuIwH5nZzIh5UazEn1C5vXHQna2i4J7rv5YLD21A+Wxf4b8EkGQpj5UkXUi IeGbXZzE5d65GmPQIFyn47xjGm4zPtS9H7qozVJ+Jfp9BZvio54MR0mNVddjQLCgb5g0 m6lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709749495; x=1710354295; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/+1MAxDJuAJQyho1HAnRuoUycvJ4xPriHfVlSiFl1RY=; b=tQMoTyz/2zMUGFXnIMgI0kiHz0ZZ5F911tJ3EsnWI8sZ9gaYIjg5FfTsVR6Eay2dv3 xeopMkP5i9HkOaWUET0J5kzqvBp/Qb8iI2duhO9Rtd07r7paSfArmYAFq+vpx97tuueC zZd6w527AZkKLdyKE/4tEMqQC8Y/mu+U+pKh/Cxyc92QTSJsQclsnHqXtnUu2Lugez0M SK4cSwj1KDquiI7TSFu1bUmrooC7BrIF30CK+k2iPhCetmRM/3QYT2qB6zL54etxsBGp QwTpWUVu1G2LFssNDYgScrLK49WfzLpUPq3kr4kDQeuQJsXMkx4Hu1DMjnohF8VfiZf3 nCag== X-Forwarded-Encrypted: i=1; AJvYcCXCb4Ku73/vCHd/UY5j41LJp1OPF+c+Tbq9gs0fXcxov/XzHLBfCTbLHJ9fWgtA4eTIAy2+AU+XhrW0smsNZdrzj3+0rlewTsEQiac/ X-Gm-Message-State: AOJu0YyNVsMWVru8z6lBcccouHxso/IQ0pviMfOH9nWvF5p5fQXHMk05 SWLRiqFsh5vNT0ke+WR/O2Hhh2zGX8o9OP+gLXdClE9JmhUAwZWkIKmXGaMKM34T4swio2XMthH S0Q== X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:85f0:e3db:db05:85e2]) (user=surenb job=sendgmr) by 2002:a05:6902:1744:b0:dcf:6b50:9bd7 with SMTP id bz4-20020a056902174400b00dcf6b509bd7mr3993490ybb.7.1709749495639; Wed, 06 Mar 2024 10:24:55 -0800 (PST) Date: Wed, 6 Mar 2024 10:24:03 -0800 In-Reply-To: <20240306182440.2003814-1-surenb@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240306182440.2003814-1-surenb@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240306182440.2003814-6-surenb@google.com> Subject: [PATCH v5 05/37] fs: Convert alloc_inode_sb() to a macro From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, jhubbard@nvidia.com, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, surenb@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org, Alexander Viro Content-Type: text/plain; charset="UTF-8" From: Kent Overstreet We're introducing alloc tagging, which tracks memory allocations by callsite. Converting alloc_inode_sb() to a macro means allocations will be tracked by its caller, which is a bit more useful. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan Cc: Alexander Viro Reviewed-by: Kees Cook Reviewed-by: Pasha Tatashin --- include/linux/fs.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 023f37c60709..08d8246399c3 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3010,11 +3010,7 @@ int setattr_should_drop_sgid(struct mnt_idmap *idmap, * This must be used for allocating filesystems specific inodes to set * up the inode reclaim context correctly. */ -static inline void * -alloc_inode_sb(struct super_block *sb, struct kmem_cache *cache, gfp_t gfp) -{ - return kmem_cache_alloc_lru(cache, &sb->s_inode_lru, gfp); -} +#define alloc_inode_sb(_sb, _cache, _gfp) kmem_cache_alloc_lru(_cache, &_sb->s_inode_lru, _gfp) extern void __insert_inode_hash(struct inode *, unsigned long hashval); static inline void insert_inode_hash(struct inode *inode) -- 2.44.0.278.ge034bb2e1d-goog