cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH dlm/next 1/3] fs: dlm: remove unnecessary error assign
Date: Mon,  2 May 2022 11:14:08 -0400	[thread overview]
Message-ID: <20220502151410.4049410-1-aahringo@redhat.com> (raw)

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 <aahringo@redhat.com>
---
 fs/dlm/lock.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index d19cfa03c9bb..97ca728dc194 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -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))
-- 
2.31.1


             reply	other threads:[~2022-05-02 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 15:14 Alexander Aring [this message]
2022-05-02 15:14 ` [Cluster-devel] [PATCH dlm/next 2/3] fs: dlm: use kref_put_lock in put_rsb Alexander Aring
2022-05-02 15:14 ` [Cluster-devel] [PATCH dlm/next 3/3] fs: dlm: use kref_put_lock in __put_lkb Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220502151410.4049410-1-aahringo@redhat.com \
    --to=aahringo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).