Tie the dynamically-allocated xarray locks into a single class so
contention on the directory offset xarrays can be observed.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Message-Id: <
169020933088.160441.
9405180953116076087.stgit@manet.1015granger.net>
Signed-off-by: Christian Brauner <brauner@kernel.org>
return (u32)((uintptr_t)(dentry->d_fsdata));
}
return (u32)((uintptr_t)(dentry->d_fsdata));
}
+static struct lock_class_key simple_offset_xa_lock;
+
/**
* simple_offset_init - initialize an offset_ctx
* @octx: directory offset map to be initialized
/**
* simple_offset_init - initialize an offset_ctx
* @octx: directory offset map to be initialized
void simple_offset_init(struct offset_ctx *octx)
{
xa_init_flags(&octx->xa, XA_FLAGS_ALLOC1);
void simple_offset_init(struct offset_ctx *octx)
{
xa_init_flags(&octx->xa, XA_FLAGS_ALLOC1);
+ lockdep_set_class(&octx->xa.xa_lock, &simple_offset_xa_lock);
/* 0 is '.', 1 is '..', so always start with offset 2 */
octx->next_offset = 2;
/* 0 is '.', 1 is '..', so always start with offset 2 */
octx->next_offset = 2;