staging: lustre: obdclass: race lustre_profile_list
authorHiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Thu, 27 Oct 2016 22:11:55 +0000 (18:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Oct 2016 15:00:12 +0000 (11:00 -0400)
commitf65053dff95e321639eb98c413dada31b457299d
tree3178432dc860b7f7bfe1c6ee0d1af5e5c78c018f
parentb44c295dba07da4b235a1bb9281e525b4fbb8263
staging: lustre: obdclass: race lustre_profile_list

Running multiple mounts at the same time results in
lustre_profile_list corruption when adding a new profile.

This patch adds a new spin_lock to protect the list and
avoid the bug

Signed-off-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6600
Reviewed-on: http://review.whamcloud.com/14896
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd_class.h
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/obdclass/obd_config.c