From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 027B33EFD02 for ; Wed, 25 Mar 2026 14:57:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774450650; cv=none; b=GWbdSINCdTMghGSXj97X2VVuPxBqtwZJKAZ5SX7tlJ9wu7kM0PlSHKxaoHG6L45vGq2GtH9bEBldx6HiBoe0DUfHvF7g1Dobohz9LJSS+wHMHGguW9d+sU7DtzzO81yF3ZhfgECRUgb8D6rkgQFg2SIwnkdG8ZKhJJ/3YZqSf5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774450650; c=relaxed/simple; bh=ZsSU0JOJYh7hNQ09XxC5qD/+oMNbgZPunSJrry2DfXc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fvdGx+nrJEfA0EmmJhpu1k0ReEWS+xOV8R9NTa9kXZaVyTQD4UX729TU/FwWeoyOm5kneNUZx8zgkBkS9ifkVk1GvGsEmYcgH7GglCcFJyg6S71JqEqHZ3XC5pqSRD3GslaqPec5NQA8vRIAPSvWYUY6Pc+PX9sHfxZ5oroP0Q8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Z0X0CLof; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=GXLtH7DF; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Z0X0CLof; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=GXLtH7DF; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Z0X0CLof"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="GXLtH7DF"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Z0X0CLof"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="GXLtH7DF" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (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) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 69CF44D247; Wed, 25 Mar 2026 14:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1774450647; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TDThzbfm4z51swQNpP/Sz73BBVvad0AbQ7d+bdgHlTI=; b=Z0X0CLofVTVeW9Uy5z61QcbE0hv2Mx0SSfcQwg9dLcSDgPk6W38Ah0+h7hQEKiH6UB3Bxo 3U+NJQF5wTPtYdvt3cLUCXKd0DXwvdMqOcKT1bbuavgUJED1ONu3jhMVCi4DbuhTiapmeG QB4/WKUudqPIpKmXBpExPhD5Amfd5IQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1774450647; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TDThzbfm4z51swQNpP/Sz73BBVvad0AbQ7d+bdgHlTI=; b=GXLtH7DFDEli9jy70jmcgm6qgJltNATHWPDFjxipYjbSjh1gVBm0R2nEyXGIdoaeZj6f41 l/pqruwQ3HZvRIDA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1774450647; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TDThzbfm4z51swQNpP/Sz73BBVvad0AbQ7d+bdgHlTI=; b=Z0X0CLofVTVeW9Uy5z61QcbE0hv2Mx0SSfcQwg9dLcSDgPk6W38Ah0+h7hQEKiH6UB3Bxo 3U+NJQF5wTPtYdvt3cLUCXKd0DXwvdMqOcKT1bbuavgUJED1ONu3jhMVCi4DbuhTiapmeG QB4/WKUudqPIpKmXBpExPhD5Amfd5IQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1774450647; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TDThzbfm4z51swQNpP/Sz73BBVvad0AbQ7d+bdgHlTI=; b=GXLtH7DFDEli9jy70jmcgm6qgJltNATHWPDFjxipYjbSjh1gVBm0R2nEyXGIdoaeZj6f41 l/pqruwQ3HZvRIDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B409E44464; Wed, 25 Mar 2026 14:57:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 3imQKNT3w2lcZQAAD6G6ig (envelope-from ); Wed, 25 Mar 2026 14:57:24 +0000 Date: Wed, 25 Mar 2026 14:57:22 +0000 From: Pedro Falcato To: "Lorenzo Stoakes (Oracle)" Cc: Andrew Morton , Arnd Bergmann , Greg Kroah-Hartman , Dan Williams , Vishal Verma , Dave Jiang , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , Muchun Song , Oscar Salvador , David Hildenbrand , Konstantin Komarov , Tony Luck , Reinette Chatre , Dave Martin , James Morse , Babu Moger , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Matthew Wilcox , Jan Kara , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Hugh Dickins , Baolin Wang , Jann Horn , Jason Gunthorpe , linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-mm@kvack.org, ntfs3@lists.linux.dev, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 4/6] mm: reintroduce vma_flags_test() as a singular flag test Message-ID: References: Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-3.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; FUZZY_RATELIMITED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[44]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[linux-foundation.org,arndb.de,linuxfoundation.org,intel.com,kernel.org,gmail.com,linux.alibaba.com,google.com,huawei.com,vivo.com,linux.dev,suse.de,paragon-software.com,arm.com,amd.com,wdc.com,infradead.org,suse.cz,oracle.com,suse.com,ziepe.ca,vger.kernel.org,lists.linux.dev,lists.ozlabs.org,kvack.org]; R_RATELIMIT(0.00)[to_ip_from(RLhefktrybubrrcz79tisgnzmd)]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email] X-Spam-Flag: NO X-Spam-Score: -3.80 X-Spam-Level: On Thu, Mar 05, 2026 at 10:50:17AM +0000, Lorenzo Stoakes (Oracle) wrote: > Since we've now renamed vma_flags_test() to vma_flags_test_any() to be very > clear as to what we are in fact testing, we now have the opportunity to > bring vma_flags_test() back, but for explicitly testing a single VMA flag. > > This is useful, as often flag tests are against a single flag, and > vma_flags_test_any(flags, VMA_READ_BIT) reads oddly and potentially causes > confusion. > > We use sparse to enforce that users won't accidentally pass vm_flags_t to > this function without it being flagged so this should make it harder to get > this wrong. > > Of course, passing vma_flags_t to the function is impossible, as it is a > struct. > > Also update the VMA tests to reflect this change. > > Signed-off-by: Lorenzo Stoakes (Oracle) Reviewed-by: Pedro Falcato This is a lot nicer, though I am wondering if there is any difference in codegen as well... -- Pedro