mgs_pool_cmd() locks fsdb_mutex and then allocates mti. It will
leave fsdb_mutex locked if it fails to allocate memory.
This patch fixes the problem.
Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I10f92522c509052916a7d7134d73c4923cfaf33e
Reviewed-on: http://review.whamcloud.com/7065
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
break;
}
- mutex_lock(&fsdb->fsdb_mutex);
-
if (canceled_label != NULL) {
OBD_ALLOC_PTR(mti);
if (mti == NULL)
GOTO(out_cancel, rc = -ENOMEM);
}
+ mutex_lock(&fsdb->fsdb_mutex);
/* write pool def to all MDT logs */
for (i = 0; i < INDEX_MAP_SIZE * 8; i++) {
if (test_bit(i, fsdb->fsdb_mdt_index_map)) {