Skip to content

Commit e91ce03

Browse files
Alexander Aringteigland
authored andcommitted
dlm: remove found label in dlm_master_lookup
This patch cleanups a not necessary label found which can be replaced by a proper else handling to jump over a specific code block. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent c087eab commit e91ce03

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

fs/dlm/lock.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -954,18 +954,18 @@ int dlm_master_lookup(struct dlm_ls *ls, int from_nodeid, char *name, int len,
954954
hold_rsb(r);
955955
spin_unlock(&ls->ls_rsbtbl[b].lock);
956956
lock_rsb(r);
957-
goto found;
958-
}
957+
} else {
958+
error = dlm_search_rsb_tree(&ls->ls_rsbtbl[b].toss, name, len, &r);
959+
if (error)
960+
goto not_found;
959961

960-
error = dlm_search_rsb_tree(&ls->ls_rsbtbl[b].toss, name, len, &r);
961-
if (error)
962-
goto not_found;
962+
/* because the rsb is inactive (on toss list), it's not refcounted
963+
* and lock_rsb is not used, but is protected by the rsbtbl lock
964+
*/
963965

964-
/* because the rsb is inactive (on toss list), it's not refcounted
965-
and lock_rsb is not used, but is protected by the rsbtbl lock */
966+
toss_list = 1;
967+
}
966968

967-
toss_list = 1;
968-
found:
969969
if (r->res_dir_nodeid != our_nodeid) {
970970
/* should not happen, but may as well fix it and carry on */
971971
log_error(ls, "dlm_master_lookup res_dir %d our %d %s",

0 commit comments

Comments
 (0)