From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH/RFC dlm/next 8/9] fs: dlm: remove found label in dlm_master_lookup
Date: Wed, 23 Feb 2022 12:08:28 -0500 [thread overview]
Message-ID: <20220223170829.830864-9-aahringo@redhat.com> (raw)
In-Reply-To: <20220223170829.830864-1-aahringo@redhat.com>
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 <aahringo@redhat.com>
---
fs/dlm/lock.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 43f362f159ef..013d46cc58e0 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -954,18 +954,18 @@ int dlm_master_lookup(struct dlm_ls *ls, int from_nodeid, char *name, int len,
hold_rsb(r);
spin_unlock(&ls->ls_rsbtbl[b].lock);
lock_rsb(r);
- goto found;
- }
+ } else {
+ error = dlm_search_rsb_tree(&ls->ls_rsbtbl[b].toss, name, len, &r);
+ if (error)
+ goto not_found;
- error = dlm_search_rsb_tree(&ls->ls_rsbtbl[b].toss, name, len, &r);
- if (error)
- goto not_found;
+ /* because the rsb is inactive (on toss list), it's not refcounted
+ * and lock_rsb is not used, but is protected by the rsbtbl lock
+ */
- /* because the rsb is inactive (on toss list), it's not refcounted
- and lock_rsb is not used, but is protected by the rsbtbl lock */
+ toss_list = 1;
+ }
- toss_list = 1;
- found:
if (r->res_dir_nodeid != our_nodeid) {
/* should not happen, but may as well fix it and carry on */
log_error(ls, "dlm_master_lookup res_dir %d our %d %s",
--
2.31.1
next prev parent reply other threads:[~2022-02-23 17:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 17:08 [Cluster-devel] [PATCH/RFC dlm/next 0/9] fs: dlm: change lock and endianness handling Alexander Aring
2022-02-23 17:08 ` [Cluster-devel] [PATCH/RFC dlm/next 1/9] fs: dlm: add __CHECKER__ for false positives Alexander Aring
2022-02-23 17:08 ` [Cluster-devel] [PATCH/RFC dlm/next 2/9] fs: dlm: use __le types for options header Alexander Aring
2022-02-23 17:08 ` [Cluster-devel] [PATCH/RFC dlm/next 3/9] fs: dlm: use __le types for dlm header Alexander Aring
2022-02-23 17:08 ` [Cluster-devel] [PATCH/RFC dlm/next 4/9] fs: dlm: use __le types for rcom messages Alexander Aring
2022-02-23 17:08 ` [Cluster-devel] [PATCH/RFC dlm/next 5/9] fs: dlm: use __le types for dlm messages Alexander Aring
2022-02-23 17:08 ` [Cluster-devel] [PATCH/RFC dlm/next 6/9] fs: dlm: move conversion to compile time Alexander Aring
2022-02-23 17:08 ` [Cluster-devel] [PATCH/RFC dlm/next 7/9] fs: dlm: remove __user conversion warnings Alexander Aring
2022-02-23 17:08 ` Alexander Aring [this message]
2022-02-23 17:08 ` [Cluster-devel] [PATCH/RFC dlm/next 9/9] fs: dlm: cleanup lock handling in dlm_master_lookup 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=20220223170829.830864-9-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).