From: Valerie Aurora <val@versity.com>
To: rpdfs-devel@lists.linux.dev
Cc: Valerie Aurora <val@versity.com>
Subject: [PATCH 1/3] rpdfs: Use write_seqlock_bh() for balloc info
Date: Thu, 19 Mar 2026 10:37:25 +0100 [thread overview]
Message-ID: <20260319093727.15343-2-val@versity.com> (raw)
In-Reply-To: <20260319093727.15343-1-val@versity.com>
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 <val@versity.com>
---
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
next prev parent reply other threads:[~2026-03-19 9:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 9:37 [PATCH 0/3] Minor locking fixes and debug output Valerie Aurora
2026-03-19 9:37 ` Valerie Aurora [this message]
2026-03-25 22:05 ` [PATCH 1/3] rpdfs: Use write_seqlock_bh() for balloc info Zach Brown
2026-03-19 9:37 ` [PATCH 2/3] rpdfs: Initialize block seqlock before using it and fix memleak Valerie Aurora
2026-03-25 22:08 ` Zach Brown
2026-03-19 9:37 ` [PATCH 3/3] rpdfs: Add debugging for block not found case in rpdfs_use_txn_prepared Valerie Aurora
2026-03-25 22:09 ` Zach Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260319093727.15343-2-val@versity.com \
--to=val@versity.com \
--cc=rpdfs-devel@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.