@@ -477,6 +477,7 @@
#define OBD_FAIL_LLITE_PCC_ATTACH_PAUSE 0x1414
#define OBD_FAIL_LLITE_SHORT_COMMIT 0x1415
#define OBD_FAIL_LLITE_CREATE_FILE_PAUSE2 0x1416
+#define OBD_FAIL_LLITE_RACE_MOUNT 0x1417
#define OBD_FAIL_FID_INDIR 0x1501
#define OBD_FAIL_FID_INLMA 0x1502
@@ -1047,6 +1047,8 @@ int ll_fill_super(struct super_block *sb)
CDEBUG(D_VFSTRACE, "VFS Op: sb %p\n", sb);
+ OBD_RACE(OBD_FAIL_LLITE_RACE_MOUNT);
+
cfg = kzalloc(sizeof(*cfg), GFP_NOFS);
if (!cfg) {
err = -ENOMEM;
@@ -823,6 +823,7 @@ void cl_lvb2attr(struct cl_attr *attr, const struct ost_lvb *lvb)
EXPORT_SYMBOL(cl_lvb2attr);
static struct cl_env cl_env_percpu[NR_CPUS];
+static DEFINE_MUTEX(cl_env_percpu_mutex);
static int cl_env_percpu_init(void)
{
@@ -888,8 +889,10 @@ static void cl_env_percpu_refill(void)
{
int i;
+ mutex_lock(&cl_env_percpu_mutex);
for_each_possible_cpu(i)
lu_env_refill(&cl_env_percpu[i].ce_lu);
+ mutex_unlock(&cl_env_percpu_mutex);
}
void cl_env_percpu_put(struct lu_env *env)