lkml.org 
[lkml]   [2021]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 08/17] gfs2: Add qd_hash_lock
Date
Allow lockdep to track the hash bit spin locks.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
fs/gfs2/quota.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 9b1aca7e1264..a933eb441ee9 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -80,6 +80,7 @@
static DEFINE_SPINLOCK(qd_lock);
struct list_lru gfs2_qd_lru;

+static DEFINE_SPLIT_LOCK(qd_hash_lock);
static struct hlist_bl_head qd_hash_table[GFS2_QD_HASH_SIZE];

static unsigned int gfs2_qd_hash(const struct gfs2_sbd *sdp,
@@ -95,12 +96,12 @@ static unsigned int gfs2_qd_hash(const struct gfs2_sbd *sdp,

static inline void spin_lock_bucket(unsigned int hash)
{
- hlist_bl_lock(&qd_hash_table[hash]);
+ hlist_bl_lock(&qd_hash_table[hash], &qd_hash_lock);
}

static inline void spin_unlock_bucket(unsigned int hash)
{
- hlist_bl_unlock(&qd_hash_table[hash]);
+ hlist_bl_unlock(&qd_hash_table[hash], &qd_hash_lock);
}

static void gfs2_qd_dealloc(struct rcu_head *rcu)
--
2.30.2
\
 
 \ /
  Last update: 2021-04-09 04:57    [W:0.441 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site