From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 E050F299A82 for ; Wed, 22 Jul 2026 12:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784722513; cv=none; b=KNOYvmr2yE0pWAQ/61E+dBIgvNXKyqWTDEnxzhfRRp3Za076O8bjeKwEgCjCLPtXjwGhDBxlY5wOMX2TCAEwwiyUGKrAtQbla8051tgiqGEZrnAJqDEN2hcmyvi4Yrc8/E68eAJEuIHEMbyahBgaA1hxQ6xxV80f5fmtC8M2sAg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784722513; c=relaxed/simple; bh=yn/vba7X909iwEG+u3IMdLOwMe5TWUZArZxwTxU2nac=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Dc68ClnyUoDpjGppWS56X4szOj60vAZXyICrSP55jB4ozfnME6JgkbRGDvx57JU3TAXfExg6LMleIhtCMJNp2ffQ4Jk8bbzo3OqWcBo+0xhrgKhqZ2O2Y/DAdTluWOkr+lMVhUsTd1Mh2g3ZBvi7B+jg+i2O86pm6w35qIfhvRM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id AB6F468D32; Wed, 22 Jul 2026 14:15:02 +0200 (CEST) Date: Wed, 22 Jul 2026 14:15:01 +0200 From: Christoph Hellwig To: Nilay Shroff Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, hch@lst.de, elver@google.com, kbusch@kernel.org, sagi@grimberg.me, axboe@fb.com, bvanassche@acm.org, gjoyce@linux.ibm.com Subject: Re: [PATCH v4 01/20] list: introduce LIST_HEAD_GUARDED Message-ID: <20260722121501.GA12774@lst.de> References: <20260713115444.465704-1-nilay@linux.ibm.com> <20260713115444.465704-2-nilay@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260713115444.465704-2-nilay@linux.ibm.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Jul 13, 2026 at 05:24:02PM +0530, Nilay Shroff wrote: > Introduce LIST_HEAD_GUARDED(name, lock) to define a struct list_head > annotated with __guarded_by(lock). This provides a convenient shorthand > for defining lock-protected list heads and allows compiler context > analysis to validate accesses to the list against the associated lock. > > The new helper also reduces boilerplate and improves consistency across > callers that annotate struct list_head objects with __guarded_by(). > > This is a preparatory change for subsequent patches that annotate > LIST_HEAD() instances with their protecting lock. > > Suggested-by: Christoph Hellwig > Signed-off-by: Nilay Shroff Looks good: Reviewed-by: Christoph Hellwig