Skip to content

Commit

Permalink
dlm: remove unnecessary error assign
Browse files Browse the repository at this point in the history
This patch removes unnecessary error assigns to 0 at places we know that
error is zero because it was checked on non-zero before.

Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
Alexander Aring authored and teigland committed May 2, 2022
1 parent 1689c16 commit 0ccc106
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/dlm/lock.c
Original file line number Diff line number Diff line change
@@ -602,7 +602,6 @@ static int find_rsb_dir(struct dlm_ls *ls, char *name, int len,
*/

kref_get(&r->res_ref);
error = 0;
goto out_unlock;


@@ -1091,7 +1090,6 @@ int dlm_master_lookup(struct dlm_ls *ls, int from_nodeid, char *name, int len,
if (result)
*result = DLM_LU_ADD;
*r_nodeid = from_nodeid;
error = 0;
out_unlock:
spin_unlock(&ls->ls_rsbtbl[b].lock);
return error;
@@ -5747,7 +5745,6 @@ int dlm_recover_master_copy(struct dlm_ls *ls, struct dlm_rcom *rc)

attach_lkb(r, lkb);
add_lkb(r, lkb, rl->rl_status);
error = 0;
ls->ls_recover_locks_in++;

if (!list_empty(&r->res_waitqueue) || !list_empty(&r->res_convertqueue))

0 comments on commit 0ccc106

Please sign in to comment.