From 913a817e5836fcb0eb35d86fbe3be79c93883abb Mon Sep 17 00:00:00 2001 From: Alex Markuze Date: Wed, 19 Mar 2025 12:17:17 +0000 Subject: [PATCH] use spinlock bh? --- fs/ceph/debugfs.c | 4 ++-- net/ceph/ceph_san_logger.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 5a7d287474af5..3c0ea06c076b2 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -421,7 +421,7 @@ static int ceph_san_tls_show(struct seq_file *s, void *p) char *comm = ctx->comm; /* Lock the pagefrag before accessing entries */ - spin_lock(&ctx->pf.lock); + spin_lock_bh(&ctx->pf.lock); /* Iterate through all log entries in this context */ while ((entry = ceph_san_log_iter_next(&iter)) != NULL) { @@ -445,7 +445,7 @@ static int ceph_san_tls_show(struct seq_file *s, void *p) } /* Unlock the pagefrag after we're done with this context */ - spin_unlock(&ctx->pf.lock); + spin_unlock_bh(&ctx->pf.lock); } spin_unlock(&g_logger.lock); diff --git a/net/ceph/ceph_san_logger.c b/net/ceph/ceph_san_logger.c index 39767326601e9..384d5edee2ce8 100644 --- a/net/ceph/ceph_san_logger.c +++ b/net/ceph/ceph_san_logger.c @@ -139,7 +139,7 @@ void ceph_san_log(const char *file, const char *func, unsigned int line, const c needed_size = sizeof(*entry) + len + 1; /* Allocate entry from pagefrag - We need a spinlock here to protect access iterators */ - spin_lock(&ctx->pf.lock); + spin_lock_bh(&ctx->pf.lock); alloc = cephsan_pagefrag_alloc(&ctx->pf, needed_size); int loop_count = 0; while (!alloc) { @@ -183,7 +183,7 @@ void ceph_san_log(const char *file, const char *func, unsigned int line, const c entry->buffer = (char *)(entry + 1); } entry->len = cephsan_pagefrag_get_alloc_size(alloc); - spin_unlock(&ctx->pf.lock); + spin_unlock_bh(&ctx->pf.lock); /* Copy to entry buffer */ memcpy(entry->buffer, buf, len + 1); -- 2.39.5