This patch fixes 3 errors found by coccinelle (a static analyser):
lustre/ptlrpc/nrs_tbf.c:312:2-8: preceding lock on line 307
lustre/fid/fid_handler.c:73:43-51: ERROR: cli is NULL but dereferenced.
lustre/lfsck/lfsck_lib.c:1564:1-10: second lock on line 1571
Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: Ic00a5c1dd331df879d6a10f11a07ef14f2beefd8
Reviewed-on: http://review.whamcloud.com/11047
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
*/
mutex_lock(&seq->lss_mutex);
*/
mutex_lock(&seq->lss_mutex);
- if (cli == NULL) {
- CDEBUG(D_INFO, "%s: Detached sequence client %s\n",
- seq->lss_name, cli->lcs_name);
- seq->lss_cli = cli;
- GOTO(out_up, rc = 0);
- }
+ if (cli == NULL) {
+ CDEBUG(D_INFO, "%s: Detached sequence client\n", seq->lss_name);
+ seq->lss_cli = NULL;
+ GOTO(out_up, rc = 0);
+ }
if (seq->lss_cli != NULL) {
CDEBUG(D_HA, "%s: Sequence controller is already "
if (seq->lss_cli != NULL) {
CDEBUG(D_HA, "%s: Sequence controller is already "
&lfsck->li_list_double_scan);
if (com != NULL)
lfsck_component_get(com);
&lfsck->li_list_double_scan);
if (com != NULL)
lfsck_component_get(com);
- spin_lock(&lfsck->li_lock);
+ spin_unlock(&lfsck->li_lock);
if (com != NULL) {
if (com->lc_ops->lfsck_stop_notify != NULL) {
if (com != NULL) {
if (com->lc_ops->lfsck_stop_notify != NULL) {
spin_lock(&head->th_rule_lock);
tmp_rule = nrs_tbf_rule_find_nolock(head, start->tc_name);
if (tmp_rule) {
spin_lock(&head->th_rule_lock);
tmp_rule = nrs_tbf_rule_find_nolock(head, start->tc_name);
if (tmp_rule) {
+ spin_unlock(&head->th_rule_lock);
nrs_tbf_rule_put(tmp_rule);
nrs_tbf_rule_put(rule);
return -EEXIST;
nrs_tbf_rule_put(tmp_rule);
nrs_tbf_rule_put(rule);
return -EEXIST;