* [RFC PATCH] fs/dlm/dir: remove unuse varible count_match
@ 2026-01-07 7:30 alexs
2026-01-07 14:14 ` Alexander Aring
0 siblings, 1 reply; 2+ messages in thread
From: alexs @ 2026-01-07 7:30 UTC (permalink / raw)
To: Alexander Aring, David Teigland,
open list:DISTRIBUTED LOCK MANAGER (DLM),
open list
Cc: Alex Shi, gfs2
From: Alex Shi <alexs@kernel.org>
The variable was never used after introduced. Better to comment it if we
want to keep the info.
fs/dlm/dir.c:65:26: error: variable 'count_match' set but not used [-Werror,-Wunused-but-set-variable]
65 | unsigned int count = 0, count_match = 0, count_bad = 0, count_add = 0;
| ^
1 error generated.
Signed-off-by: Alex Shi <alexs@kernel.org>
Cc: gfs2@lists.linux.dev
Cc: Alexander Aring <aahringo@redhat.com>
Cc: David Teigland <teigland@redhat.com>
---
fs/dlm/dir.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c
index b1ab0adbd9d0..01c292379f5b 100644
--- a/fs/dlm/dir.c
+++ b/fs/dlm/dir.c
@@ -62,7 +62,7 @@ int dlm_recover_directory(struct dlm_ls *ls, uint64_t seq)
char *b, *last_name = NULL;
int error = -ENOMEM, last_len, nodeid, result;
uint16_t namelen;
- unsigned int count = 0, count_match = 0, count_bad = 0, count_add = 0;
+ unsigned int count = 0, count_bad = 0, count_add = 0;
log_rinfo(ls, "dlm_recover_directory");
@@ -157,12 +157,12 @@ int dlm_recover_directory(struct dlm_ls *ls, uint64_t seq)
}
/* The name was found in rsbtbl, and the
- * master nodeid matches memb->nodeid. */
+ * master nodeid matches memb->nodeid.
if (result == DLM_LU_MATCH &&
nodeid == memb->nodeid) {
count_match++;
- }
+ }*/
/* The name was not found in rsbtbl and was
* added with memb->nodeid as the master. */
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [RFC PATCH] fs/dlm/dir: remove unuse varible count_match
2026-01-07 7:30 [RFC PATCH] fs/dlm/dir: remove unuse varible count_match alexs
@ 2026-01-07 14:14 ` Alexander Aring
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Aring @ 2026-01-07 14:14 UTC (permalink / raw)
To: alexs; +Cc: David Teigland, open list:DISTRIBUTED LOCK MANAGER (DLM), open list
Hi,
On Wed, Jan 7, 2026 at 2:36 AM <alexs@kernel.org> wrote:
>
> From: Alex Shi <alexs@kernel.org>
>
> The variable was never used after introduced. Better to comment it if we
> want to keep the info.
>
> fs/dlm/dir.c:65:26: error: variable 'count_match' set but not used [-Werror,-Wunused-but-set-variable]
> 65 | unsigned int count = 0, count_match = 0, count_bad = 0, count_add = 0;
> | ^
> 1 error generated.
>
> Signed-off-by: Alex Shi <alexs@kernel.org>
> Cc: gfs2@lists.linux.dev
> Cc: Alexander Aring <aahringo@redhat.com>
> Cc: David Teigland <teigland@redhat.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
- Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-07 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-07 7:30 [RFC PATCH] fs/dlm/dir: remove unuse varible count_match alexs
2026-01-07 14:14 ` Alexander Aring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®