From nobody Tue Feb 10 16:18:41 2026 Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) (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 A58ED35CBAB for ; Thu, 18 Dec 2025 15:58:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766073483; cv=none; b=i2sptK8je+07bGRPzwc+DMdZNkchsjXnkL7zyTdxVdI3Uf+Sj6akTqKy1Wo4DdRIg3h1NbsPDtzMK8DoJl4w84Cydd6H3CzG6B9tcDobwrsY2uaWCCYiVLohwuYEkjADY0BslgEFg5Hi4q6tjYieKStiLWIVTI25y4rBaGGBtls= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766073483; c=relaxed/simple; bh=aMsFRDBi6woKXA5wTe+E4vw7DDifElUEP57EAPkIp5o=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LgiRWra5+nwhmqfcFqEJ0xLlO/kIgzCvfFezv8l1LnoeEOgtxGFbY7eCE/eq6COAKXKePfCioDgEYSY01fhMVIRnk/rf0caziYBHBylwQTh3Ytj5U/jVBcU+xoF3ZSVL/MvZ58hRuZNAxVqN1WbLVC2/HXaIv7JiFCsjZFcBMe4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=CD137uXf; arc=none smtp.client-ip=209.85.128.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="CD137uXf" Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-786d1658793so6567047b3.1 for ; Thu, 18 Dec 2025 07:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1766073480; x=1766678280; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=t4Z1msUY2rAxWdAtpYqttwDLBLeupKQK68y4s4x3GKw=; b=CD137uXf3KttblvNO7cH9oH+IQ2TYcH+2ltCi9DYVSwghyuASmupDeCqgDtyJfNygU qVdew55Accln0/7RwS/8mizLQWjI+8Vpr2EmBpfBvdXHUP35ILmU+SrdwXCzt4V2odFo Iv4Jombf6xvXC1aYWi+MzNJA2qK8dlIoXoioh2rmFQSEIQImRuKiEN+do5kvpyKf88ut yjNQOWR292O+CDWp3yGeg2/+5QiohX2omu+ZMZkJmJi6Uz+BX4FQoiRWJcuBNTcw0/EX gfuOYmcP2nC+ldXQkpdUPLtn0mM5qXqJjqHJyBdHWQoDH2Y8aL5vRCnaGZNS4sq7co4Z 95Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766073480; x=1766678280; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=t4Z1msUY2rAxWdAtpYqttwDLBLeupKQK68y4s4x3GKw=; b=k1fJAKU8HR/o9+UuvJ7dV5RryVeMxaEfRTolOBUlUrCHgwHJ4xmoTUJjk1HvMGP2cd H9e728o38khGNLZ4m4lID4VUXmBR2EDoPpmzSNd5xW2WYkN472BNOXpNpnM6oltTtAoU A6j4E22WhJAgNik+X64kXYwl0nfOgAbXTuFmUVpKq38V5R8MRr4rrxMvO9lKtq6Bt7U3 V32yn4EondKcGaZ9nXwo03hhfpmoHu4aGJ5hbwoO3QpHaWGmRt1wmEJpgthy5CwP0aYi tjGvpFz33kytXifotd5DFliBIw/SC7KM6eP0U0hRea0dPpak42aAVHbCbxFI0D8b63zb RjMA== X-Forwarded-Encrypted: i=1; AJvYcCWM4x7qF5J4hXHn58tH5Vk3HhYahV8HrIyM5R+gcF0voZAKjW+WfQLb6k+83SVFpsztBLHD7VS5lPyz0Bc=@vger.kernel.org X-Gm-Message-State: AOJu0YyhddRQU2WZQlolaoNl+8mRhmrNL/q11wlpGDNctxXQiYIyiUj2 FtutQjtrOlgiontqUp+HRRsxYkdw4SYBvPaDjEv0tmPlXHK0ThBYxmAq3FNxd7Y5Qqc= X-Gm-Gg: AY/fxX4m0CvIjRxF7wW47XJN1XYC9fZX65C8CMzXvJHG5x/cz5IJkgwKNuam0/TNxNy LAGXg5ZWiPORc3EEC6Mm+BAJUthucNnGgmnNB2YFROeLiOhC0nO8kG0uK+4UEAn42DsSZyt3Afl LdKDfMuKfdt0unw78fru6o2v6ENcd8QD9AqHncf5nfhiU4DMN3qODyffkLye5BvsMuuXzufaQWx 4o/1xzWql5LStqi6mG290mpg6aK/Uv5BqSY6gdlmDW921aUMo80Zde0TuDScrcCDhwzok1vi0Xi YC1Yl/D2PCUXUDHpsfRZW/ziyEgIXV7b0XtVNZTeIbCvxLmQSa+3FFMlYrfbNdUsXDId2nwS/jg RJLy+INQktXoNIf4qf+adivDFXfWFqIswKDVt3o3A25XQl+pf2YbYWvuFUryVisNjaMLF+caXlv 92+5eqDr3RY93+3UYnS1YIqikxoSj4sFxvOLBmJ6pgnHSf5SEa3UuE6+BVMBaDIhSfeAW9Nyx68 HZwoNQoUZDtR1aGLEZiWIlifSyS2iGrkMuiXQ== X-Google-Smtp-Source: AGHT+IFWhdACNbagBIHkwDyaADUMWOMF328GmPZhKrlu7OopueUq4wR0Bm9AacSAzm29ZXOrWmckMQ== X-Received: by 2002:a05:690c:6505:b0:781:32c:b359 with SMTP id 00721157ae682-78e66dc90e4mr367785787b3.36.1766073480552; Thu, 18 Dec 2025 07:58:00 -0800 (PST) Received: from soleen.c.googlers.com.com (182.221.85.34.bc.googleusercontent.com. [34.85.221.182]) by smtp.gmail.com with ESMTPSA id 00721157ae682-78fa6f52bb2sm9348467b3.16.2025.12.18.07.57.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 07:58:00 -0800 (PST) From: Pasha Tatashin To: pratyush@kernel.org, pasha.tatashin@soleen.com, rppt@kernel.org, dmatlack@google.com, skhawaja@google.com, rientjes@google.com, corbet@lwn.net, akpm@linux-foundation.org, kees@kernel.org, davidgow@google.com, pmladek@suse.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, nicolas.frattaroli@collabora.com, linux-doc@vger.kernel.org, tamird@gmail.com, raemoar63@gmail.com, graf@amazon.com Subject: [PATCH v2 3/5] liveupdate: luo_file: Use private list Date: Thu, 18 Dec 2025 10:57:50 -0500 Message-ID: <20251218155752.3045808-4-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.52.0.313.g674ac2bdf7-goog In-Reply-To: <20251218155752.3045808-1-pasha.tatashin@soleen.com> References: <20251218155752.3045808-1-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Switch LUO to use the private list iterators. Signed-off-by: Pasha Tatashin --- kernel/liveupdate/luo_file.c | 7 ++++--- kernel/liveupdate/luo_internal.h | 7 ------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c index a32a777f6df8..1a8a1bb73a58 100644 --- a/kernel/liveupdate/luo_file.c +++ b/kernel/liveupdate/luo_file.c @@ -104,6 +104,7 @@ #include #include #include +#include #include #include #include @@ -273,7 +274,7 @@ int luo_preserve_file(struct luo_file_set *file_set, u6= 4 token, int fd) goto err_fput; =20 err =3D -ENOENT; - luo_list_for_each_private(fh, &luo_file_handler_list, list) { + list_private_for_each_entry(fh, &luo_file_handler_list, list) { if (fh->ops->can_preserve(fh, file)) { err =3D 0; break; @@ -760,7 +761,7 @@ int luo_file_deserialize(struct luo_file_set *file_set, bool handler_found =3D false; struct luo_file *luo_file; =20 - luo_list_for_each_private(fh, &luo_file_handler_list, list) { + list_private_for_each_entry(fh, &luo_file_handler_list, list) { if (!strcmp(fh->compatible, file_ser[i].compatible)) { handler_found =3D true; break; @@ -835,7 +836,7 @@ int liveupdate_register_file_handler(struct liveupdate_= file_handler *fh) return -EBUSY; =20 /* Check for duplicate compatible strings */ - luo_list_for_each_private(fh_iter, &luo_file_handler_list, list) { + list_private_for_each_entry(fh_iter, &luo_file_handler_list, list) { if (!strcmp(fh_iter->compatible, fh->compatible)) { pr_err("File handler registration failed: Compatible string '%s' alread= y registered.\n", fh->compatible); diff --git a/kernel/liveupdate/luo_internal.h b/kernel/liveupdate/luo_inter= nal.h index c8973b543d1d..3f1e0c94637e 100644 --- a/kernel/liveupdate/luo_internal.h +++ b/kernel/liveupdate/luo_internal.h @@ -40,13 +40,6 @@ static inline int luo_ucmd_respond(struct luo_ucmd *ucmd, */ #define luo_restore_fail(__fmt, ...) panic(__fmt, ##__VA_ARGS__) =20 -/* Mimics list_for_each_entry() but for private list head entries */ -#define luo_list_for_each_private(pos, head, member) \ - for (struct list_head *__iter =3D (head)->next; \ - __iter !=3D (head) && \ - ({ pos =3D container_of(__iter, typeof(*(pos)), member); 1; }); \ - __iter =3D __iter->next) - /** * struct luo_file_set - A set of files that belong to the same sessions. * @files_list: An ordered list of files associated with this session, it = is --=20 2.52.0.313.g674ac2bdf7-goog