From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 950183B4E81 for ; Thu, 19 Mar 2026 09:37:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773913068; cv=none; b=WdRKVqobaWJ9tdshyeN1xC9LjbGEK8FT7MawfQdNzcsuK1GYS+SKjKuMCX6pd9FdXNAcwmYf5oFrUtBtX9RgGuo3gw/GpWcJan+wNstHEjMK4jppkcirmSeOZazDDXVxV3x5KIfRszn+XS3P4rykkASa7ftLgnY1SfQ8lyyGcDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773913068; c=relaxed/simple; bh=JrwQo7eDM8U/kHR4bWuKfmnVfsJkvbhRa+ltaTCyN4I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CkS3PTRlstMEPJ2CMxOAlGVkaypfomSJxU8tT/QYWzN/TMmNASTr9j6GRhej1D4xQnxNCENKHZhcsEShRZdSyuByG1ERzu0tCAn5BgbyvU7ojZ0KSJmCkEsHAya7xYysH9+bQZuj2B+DlvM+u3pEHkqhKishSRbSPhXa0JcWRJA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=permerror header.from=versity.com; spf=pass smtp.mailfrom=versity.com; dkim=pass (2048-bit key) header.d=versity.com header.i=@versity.com header.b=bz6Fr71r; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=permerror header.from=versity.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=versity.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=versity.com header.i=@versity.com header.b="bz6Fr71r" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-b9382e59c0eso110845366b.0 for ; Thu, 19 Mar 2026 02:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=versity.com; s=google; t=1773913064; x=1774517864; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dvqCWTIza2yntePkjAZCEzvN/JF1XtPzpQ1iEUAA30I=; b=bz6Fr71rDiWJ5U6J7i/dSzi97ZxxxhHJcEMBIuZ2bnMKtXrPeSefvCPUDK/lpUsozH ekOoRrEpIHvYWuGts/MBkuQ409JL+i/KRYX3nuKuKYkGXI0tqvVvg6WyETGIQUeM9H55 d7futnjFR7v5uiip5HS/FBmzt0Y2uBBBfSv+9k3mLZlN2iM80Y8jjsS1paqySVi2acxU oYj61VTpFaCuV2Y6x8p6IyGk6qycknJgkhietjk2KFYwj5g5Dabz36Krr7BRQuDBgku3 ZW1PddFm1wUiGXQ+eo2jMxGIUn13BtyFbSKcpnub90lStpxvXbmR/HMqZ/PKCm0RxU/g P7XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773913064; x=1774517864; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dvqCWTIza2yntePkjAZCEzvN/JF1XtPzpQ1iEUAA30I=; b=mbuNnl24iYoT2s+T4mfGafuDMhC2K8IC7l3Y+kQZnEL0bEb/rppSgn8VoDMcc7EA4Y NdqMJD2we6vIMt+P26/3OaX5Y++OR7MaWag2ebhwAc38wZ573IFj2F+ZuobbSkujOgPF bXfVbDL/hiaBvg5fwWbCJmEWGMhygrbFICK9DwFXuI8Z/abezBBFO779Xo2FlwF2OI7G CvO6M084Flyt33qqIkM3+HZd32SF3+GKOLOZIGi5Ott3UuLxh6oybLAKhyqWia7ckMZ+ V3FplTsr8Un4lCQ/ztr0yL4aWJLmULY+GGXtFIpvjezCk5/aU4PmiPm/67q3JfTP9meN sW8A== X-Gm-Message-State: AOJu0YwjktlhQJ9Jm4Zzwv4jQ1cydAIxXGoIiu1dlkC4bqA3t1R3Dnlu gP5vLnJnuaYTmfVL131Ysy1xNr5PDaWioRiJMg04ZMzG1462B5j/yUPq4ybpsCy0t78osnJiYqZ aXs0y X-Gm-Gg: ATEYQzzRXMPr5K7O4qV0B+3EADoyM0d2jX3l29ItVPdJy8MhxXE4F2K2DDUlvxZVxvb dacLzVnLN+q3Uu9J3ucSvEGBL8B7+jKGdbXfzDxUZ+30ef42lIXNpDnHy9Mwipu2ocp3/D62Tqm KAO3a7YF/b7XPV8WfFtowxg3ZkU8SzEI+iUvRvXxOD+m4UVXmIT7zZybt++7lI6bm6nOQnjDY4j x6qv7ofvIBsbv19r/C1roijVO0CxXYC79KqVISZ4DeIAeFr49fIYr0GQRInMsDWYtIDo3jNMBOw z9EEVtq5d/xfadFxVL0TywI6gayseN7zpJ0CN8CVC5KzgSYPxI1ivLGwlkhFGJygXa0WfWEKQH0 Y1f0Ra+uU5fXrUwyx1mfwW/GIOj0vh+okFOoL5dGNiSb/i6OuAB6J6hUu13RBidYYaj9JqzOsSI Q9573dfbQZLbDqfBFn/72jkzw9zeKrIfkUn6t+FUwlkVcQfC7EYYrYMQbOp72ACzf/Ph7LhLmz9 GPQzrxKbhfP0yDjrjoFMa2nXnk= X-Received: by 2002:a17:907:2da7:b0:b97:a5a2:cec8 with SMTP id a640c23a62f3a-b97f4863c2dmr490028266b.11.1773913063755; Thu, 19 Mar 2026 02:37:43 -0700 (PDT) Received: from localhost.localdomain (46-117-212-87.ftth.glasoperator.nl. [87.212.117.46]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b97f142cf16sm427306666b.20.2026.03.19.02.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 02:37:43 -0700 (PDT) From: Valerie Aurora To: rpdfs-devel@lists.linux.dev Cc: Valerie Aurora Subject: [PATCH 1/3] rpdfs: Use write_seqlock_bh() for balloc info Date: Thu, 19 Mar 2026 10:37:25 +0100 Message-ID: <20260319093727.15343-2-val@versity.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260319093727.15343-1-val@versity.com> References: <20260319093727.15343-1-val@versity.com> Precedence: bulk X-Mailing-List: rpdfs-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The balloc info seqlock is taken from bh context due to rpdfs_balloc_publish_region() being called from an RCU callback, so it needs to use write_seqlock_bh() instead of write_seqlock(). Found via lockdep. Signed-off-by: Valerie Aurora --- fs/rpdfs/balloc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/rpdfs/balloc.c b/fs/rpdfs/balloc.c index 6a43a7c08aa6..ec1070b4a2d6 100644 --- a/fs/rpdfs/balloc.c +++ b/fs/rpdfs/balloc.c @@ -136,9 +136,9 @@ void rpdfs_balloc_publish_region(struct rpdfs_fs_info *rfi, struct rpdfs_balloc_ rpdfs_balloc_free_region(reg); atomic_inc(&balinf->enospc_count); } else { - write_seqlock(&balinf->seqlock); + write_seqlock_bh(&balinf->seqlock); list_add_tail(®->head, &balinf->region_list); - write_sequnlock(&balinf->seqlock); + write_sequnlock_bh(&balinf->seqlock); } wake_up(&balinf->waitq); } @@ -192,12 +192,12 @@ struct rpdfs_balloc_region *rpdfs_balloc_take_region(struct rpdfs_fs_info *rfi) while_read_seqretry(&balinf->seqlock) empty = list_empty(&balinf->region_list); if (!empty) { - write_seqlock(&balinf->seqlock); + write_seqlock_bh(&balinf->seqlock); reg = list_first_entry_or_null(&balinf->region_list, struct rpdfs_balloc_region, head); if (reg) list_del_init(®->head); - write_sequnlock(&balinf->seqlock); + write_sequnlock_bh(&balinf->seqlock); } if (reg) break; @@ -252,9 +252,9 @@ void rpdfs_balloc_return_region(struct rpdfs_fs_info *rfi, struct rpdfs_balloc_r put_cpu_ptr(balinf->pcpu_region); if (reg) { - write_seqlock(&balinf->seqlock); + write_seqlock_bh(&balinf->seqlock); list_add(®->head, &balinf->region_list); - write_sequnlock(&balinf->seqlock); + write_sequnlock_bh(&balinf->seqlock); wake_up(&balinf->waitq); } } -- 2.49.0